Author Topic: ElseIf Limitatation ?  (Read 6827 times)

0 Members and 2 Guests are viewing this topic.

Aurel

  • Guest
Re: ElseIf Limitatation ?
« Reply #15 on: February 16, 2015, 12:07:24 AM »
Hi Peter...
unfortunately last dll from Arnold post not work properly or worst
it just crush program when WM_COMMAND event is called .
I relly cannot understand WHY any new bug fixed version have some strange
conflict with windows api
  :(

i will try use dll from last oxygen release to see...

Aurel

  • Guest
Re: ElseIf Limitatation ?
« Reply #16 on: February 16, 2015, 12:13:16 AM »
this old dll work for me 479kB

.

Peter

  • Guest
Re: ElseIf Limitatation ?
« Reply #17 on: February 16, 2015, 02:10:55 AM »
Hi Aurel,

The last dll works well, tried it with my asm library, there were not problems!
 Dll date: 11.02.2015

Aurel

  • Guest
Re: ElseIf Limitatation ?
« Reply #18 on: February 16, 2015, 03:07:57 AM »
Peter i can agree right now that last dll work with your programs but not
with mine.
I suspect on Bind ()
which seems that makes whole bunch of problems in oxygen
And i use a lot of strings in my programs so this is completely differnt stuff than you use ..

Charles Pegge

  • Guest
Re: ElseIf Limitatation ?
« Reply #19 on: February 16, 2015, 06:40:52 AM »
Hi Aurel,

AsciEdit2 and WebBrowserATL  still work, so Bind in awinh.inc is okay.

Aurel

  • Guest
Re: ElseIf Limitatation ?
« Reply #20 on: February 16, 2015, 07:14:40 AM »
sorry Charles
i really don't know what to say...
in attachment is miniRub with two example which work when ruben2 interpreter is compiled
with old dll...
but when i compile with latest dll then interpreter crush or not respond

.

Charles Pegge

  • Guest
Re: ElseIf Limitatation ?
« Reply #21 on: February 16, 2015, 08:19:46 AM »
Hi Aurel,

I am able to compile and run ruben2 (clickdraw.rub), using drag and drop onto the exe file.

I supplied awinh.inc from the projectsB/Scintilla folder, and RTL32 from /inc.

Is your RTL32.inc up to date?

Arnold

  • Guest
Re: ElseIf Limitatation ?
« Reply #22 on: February 16, 2015, 11:10:02 AM »
Hi Aurel,

why do you use such an outdated SciLexer.dll?

I do my projects outside of OxygenBasic and use e.g. Include "$\inc\rtl32.inc", so  my OxygenBasic stays untouched. Before I unzip a new OxygenBasic download, I rename the old o2h folder adding a date, so I can compare with previous versions.

I renamed your rubens2.exe and copied the files which Charles indicated. I can confirm that after compiling your rubens2.o2bas and then drag and drop ClickDraw.rub or MouseMove.rub to the exe file will crash the rubens2.exe. This will also happen if I use a previous build (A40 "06:30 30/01/2015") The size of your exe file is ca 100 kb, the size of my file ca 99 kb.

I have an older build of last year ("20:21 01/07/2014"). Here compiling to an exe and running it works (with the latest rtl32.inc file). The size of the exe is about the same as yours but not exactly.

I do not know if the result differs when using 32bit or 64bit. And I do not know why I get a different result as Charles. But I think you should at least use a more up to date SciLexer.dll?

Roland

Aurel

  • Guest
Re: ElseIf Limitatation ?
« Reply #23 on: February 16, 2015, 12:09:16 PM »
Quote
Hi Aurel,
I am able to compile and run ruben2 (clickdraw.rub), using drag and drop onto the exe file.
I supplied awinh.inc from the projectsB/Scintilla folder, and RTL32 from /inc.
Is your RTL32.inc up to date?

Hi Charles

If i understand properly you are able to compile ruben2 using latest dll + latest RTL32
so if that is true then problem is in my old RTL32.inc
Ok Charles i ill try this ....  ;)



Aurel

  • Guest
Re: ElseIf Limitatation ?
« Reply #24 on: February 16, 2015, 12:17:56 PM »
Quote
Hi Aurel,
why do you use such an outdated SciLexer.dll?
I do my projects outside of OxygenBasic and use e.g. Include "$\inc\rtl32.inc", so  my OxygenBasic stays untouched. Before I unzip a new OxygenBasic download, I rename the old o2h folder adding a date, so I can compare with previous versions.
I renamed your rubens2.exe and copied the files which Charles indicated. I can confirm that after compiling your rubens2.o2bas and then drag and drop ClickDraw.rub or MouseMove.rub to the exe file will crash the rubens2.exe. This will also happen if I use a previous build (A40 "06:30 30/01/2015") The size of your exe file is ca 100 kb, the size of my file ca 99 kb.
I have an older build of last year ("20:21 01/07/2014"). Here compiling to an exe and running it works (with the latest rtl32.inc file). The size of the exe is about the same as yours but not exactly.

I do not know if the result differs when using 32bit or 64bit. And I do not know why I get a different result as Charles. But I think you should at least use a more up to date SciLexer.dll?
Hi Arnold
I use old 1.6.8.0 version of scintilla because works fine for me and is small .
Yes Arnold i also get crushed ruben2 if i use latest dll BUT as Charles might be problem in older
RTL32.inc...so i will see
But if you whish to build on my way u must use old dLL ( i really don't know when is released ??)
and then will work on your computer to.

Charles Pegge

  • Guest
Re: ElseIf Limitatation ?
« Reply #25 on: February 16, 2015, 02:51:30 PM »
Some RUB programs I can get working, some not. It looks like an overflow corruption problem somewhere.

Arnold

  • Guest
Re: ElseIf Limitatation ?
« Reply #26 on: February 17, 2015, 03:43:34 AM »
I must correct myself. I did not notice the very last build.

Charles: if I see below the magician the time: February 16.2015 7:13, is this time shown with all browsers in the world?

When I run the compiled code, mousemov.rub works, ClickDraw.rub gives a GPF. For me this is an indication, that something is not ok with the code. (Some of my projects do not work ok neither, but I will correct them).

When I looked into the code of ruben2.o2bas, I got a big surprise. There is so much well structured code in the demos of Oxygen and the contributions, but this code is very hard to read. The first thing I did was to format it with indenter.o2bas. I had to check with my text-diff tool of PsPad, because there seems to be some whitespace in Rubens2.o2bas which confuses indenter.o2bas. Anyway my_Rubens2.o2bas is the same line by line code, but indented.The next thing I will do is to comment out #lookahead to arrange a bottom up reconstruction.

Charles: Reading the OxygenBasic help is my assuption correct?

(one line instruction)
if a>b then a print a         (no more statements)
if a>b then print a else print b   (if using : then this is no one liner?)

multi line instruction)
'MULTI-LINE FORMAT
 
  if a>b then
    s=`A>B`
  elseif a=b then
    s=`A=B`
  else
    s=`A<B`
  end if

Is 'then' mandatory with this construct? I use it intuitively, because it looks much clearer to me.

I also found gosub in the code. What is the best way to use gosub? There are some demos supplied with OxygenBasic and Oxygen seams to be very tolerant.

Roland
 

.

Charles Pegge

  • Guest
Re: ElseIf Limitatation ?
« Reply #27 on: February 17, 2015, 04:19:51 AM »
Hi Roland,

Yes, if .. then .. else .. can be used as a single liner

But I agree that the multi-line format is clearer and more useful for all but the simplest of statements.

I am also looking closely at Aurel's code. As you can see it is a combination of many different coding styles. There is a particular problem with Tally. I found that any attempt to alter it renders the exe file unusable.

I think it would benefit from a full rewrite - that would bring the source code down from 77k to about 30k, and eliminate most of the string variables.

Gosub is intended for labelled suboutines located within an individual procedure, able to operate within the same scope.  But it can be used to call another procedure which has no arguments, and does not need to share its internal variables.


« Last Edit: February 17, 2015, 04:32:52 AM by Charles Pegge »

Aurel

  • Guest
Re: ElseIf Limitatation ?
« Reply #28 on: February 17, 2015, 11:44:53 AM »
Quote
but this code is very hard to read  *** is combination of many coding styles

ahh sorry guys blame on me ... ;D
In fact ruben2 is not to complex at all ..most of things are very transparent.
I have discovered one maybe crucial problem in ruben2
inside SUB RunCode i use PeekMessage api function to prevent blocking of message
interception and it looks that this small routine create conflict with new window
which must be able to operate with events (message processing)...
strange thing is that is not in conflict by WM_COMMAND but is with WM_MOUSEMOVE...
I must fix that...

About GOSUB i think that if you use GOSUB subName you don't need to use
parenth like you can without gosub like
MySubProgram()

Arnold

  • Guest
Re: ElseIf Limitatation ?
« Reply #29 on: February 18, 2015, 10:14:44 AM »
Hi Aurel,

I give up with trying to get Ruben2.o2bas structured bottom up. First there was a loop: Expression, Term. Factor, Expression. Now I find the flow: Getvar calls GerFunc which calls EvalLine which calls Expression which calls Term which calls Factor Which calls Getvar ... This is not worth the trouble any more- At least this is too difficult for me.

If your code works with an older version of Oxygen you are lucky. As I am only a hobby programmer I only will do some small projects. I admire the people who can solve difficult problems in an elegant recursive manner, but I never saw that they used mutual function calls in this extensive manner.


Roland