View Full Version : A problem conc. Dynamic compiling using linked functions from within O2
Hi all,
Seems I need to delete function declarations (linked to O2) from within TB to be able to reuse them.
Been browsing the help files, but for the moment I found nothing.
If it is not possible I can do it without the linked functions (by a simple O2_EXEC), but it should be handy ...
thanks in advance, Rob
(attached something showing the problem)
Charles Pegge
07-01-2014, 00:57
Hi Rob,
The variable linkage of the first compile appears to carry over to the second compile.
But I found that inserting an empty compile before your second compile, fixes the problem:
o2_basic ""
o2_basic s
Ah, excellent !!
I was working on something to bypass the usual "Eval" by using O2.
But already converted it to a "global" 02 call in the mean time -- but i'll convert it back.
In the program the textbox at the bottom left accepts any formula (within the Oxy syntax ) - the compiling is done by pushing the O2 button.
Scaling of the z values (f(x,y)) is done by half values/double values (buttons). Scaling the grid x,y is auto etc... animations by the cursor keys ...
(can be handy for young math students , wanting to have a look ... a picture tells more than 1000 words (infact this are 10000 numbers representated :-)).
thanks Charles !
(prog best at full screen)
mike lobanovsky
07-01-2014, 08:08
I'll be damned! :o
Charles Pegge
07-01-2014, 09:42
Hi Rob,
I think using shared variables and the simple o2_basic / o2_exec scheme, as you have done here, is the best solution for this kind of program.
I recommend removing the bye() procedure, so that Oxygen will automatically terminate, freeing all of its resources at the end of each o2_exec.
Thanks Charles , Mike ..
best Rob
Charles,
Could you please provide me a link to something
that explains Oxygenbasic's interaction with thinBasic?
I mean like it's purpose for thinBasic and what it's
suppose to do for it.
Thanks,
Bill
Charles Pegge
08-01-2014, 14:04
Hi Bill,
I have revised the original thinBasic_Oxygen compiler module post, containing a brief description.
http://www.thinbasic.com/community/showthread.php?t=9653
I hope this helps.
John Spikowski
08-01-2014, 21:35
And I would be delighted if any of the innovations in Oxygen might also be usefully deployed in thinBasic itself.
Thanks for setting the trap. :) Once Eros accepts that PowerBASIC (and its author) is dead, maybe he can use ALL the features of O2 rather than piece mealing them in.
mike lobanovsky
08-01-2014, 22:58
Intriguant! http://www.fbsl.net/phpbb2/images/smilies/icon_ml_duel.gif
http://www.fbsl.net/phpbb2/images/smilies/icon_lol.gif
Charles,
Thank you very much.
Bill