Author Topic: Goto label inside a select case block?  (Read 3688 times)

0 Members and 3 Guests are viewing this topic.

Aurel

  • Guest
Re: Goto label inside a select case block?
« Reply #15 on: May 10, 2019, 02:56:30 PM »
I am not former PowerBasic user.
Yes i agree with Charles ..far better method!
« Last Edit: May 10, 2019, 10:27:39 PM by Aurel »

Brian Alvarez

  • Guest
Re: Goto label inside a select case block?
« Reply #16 on: May 10, 2019, 05:00:37 PM »
Thanks Aurel. May i ask what software do you write?

Aurel

  • Guest
Re: Goto label inside a select case block?
« Reply #17 on: May 10, 2019, 11:11:31 PM »
Of course ..you can  :)

Well...the most known is old Aurel Basic written in EB by IonicWind.
Then .. experimental Ruben Interpreter written in Oxygen Basic    .
Then.. failed attempt to bytecode toy interpreter ...i am too lazy for that  ::)
Then... JimKlutho basic written in PowerBasic ...translation to Oxygen Basic..
Then newest - token based interpreter micro(A) ...he he

also
Aurel Edit - code editor written completely in Oxygen Basic with pure winApi.
awinh.inc - include written in Oxygen basic for Oxygen Basic GUI apps.
etc..
etc..

Brian Alvarez

  • Guest
Re: Goto label inside a select case block?
« Reply #18 on: May 11, 2019, 12:56:09 AM »
I am not former PowerBasic user.

Then... JimKlutho basic written in PowerBasic ...translation to Oxygen Basic..

how? :o

Aurel

  • Guest
Re: Goto label inside a select case block?
« Reply #19 on: May 11, 2019, 05:42:53 AM »
Let say ..easy with a little help of Charles of course.
Look BASIC is BASIC and syntax is very similar.
so i do  it function by function and made it  :)

here is link:
http://basicpro.mipropia.com/smf/index.php?topic=22.0
« Last Edit: May 11, 2019, 06:10:53 AM by Aurel »

JRS

  • Guest
Re: Goto label inside a select case block?
« Reply #20 on: May 11, 2019, 07:41:13 AM »
ScriptBasic allows GOTO / GOSUB within a function / sub and even using duplicate labels defined in other functions. You can't jump in or out of a function/sub with GOTO.

Brian Alvarez

  • Guest
Re: Goto label inside a select case block?
« Reply #21 on: May 15, 2019, 04:36:02 PM »
 Charles... i apologize for bringing this back, but, is there a way to add a more free goto? It doesnt
matter if its a lower level method... maybe i can take a look at oxygen's code...

 I am trying to re-implement exit macro, it works but by adding tricks that not always will work
depending on the content of the macro.

 Sometimes the macro can end where a block starts... so, emulating an EXIT MACRO will fail, because
exiting the macro would force jumping into a block like do/loop.

 Scopes are great, but sometimes skills are crippled by them...

 
« Last Edit: May 15, 2019, 08:55:30 PM by Brian Alvarez »

Charles Pegge

  • Guest
Re: Goto label inside a select case block?
« Reply #22 on: May 16, 2019, 07:00:20 AM »
Hi Brian,

The linker requires that 'global' labels get special handling so they are not disallocated when blocks close.

I'm testing a scheme in which global label names start with a dot:

Code: [Select]
'15:45 16/05/2019
'jumping into inner block
goto .gl
'jmp fwd .gl
(
  print "!"
  ..gl 'global label
)
print "label location " @.gl
« Last Edit: May 16, 2019, 07:09:11 AM by Charles Pegge »

Brian Alvarez

  • Guest
Re: Goto label inside a select case block?
« Reply #23 on: May 16, 2019, 07:10:17 AM »
 That is good news Charles!! This was driving me crazy!
Please let me know how it goes! :D

And... sorry to be a pain in the butt! :(

 I enhanced macros quite a lot, i promise this is going to be worth it. You will see soon!

JRS

  • Guest
Re: Goto label inside a select case block?
« Reply #24 on: May 16, 2019, 02:54:44 PM »
Quote
 I enhanced macros quite a lot, i promise this is going to be worth it. You will see soon!

Just in time before PowerBasic vendors and users start jumping off buildings.  ;D

Brian Alvarez

  • Guest
Re: Goto label inside a select case block?
« Reply #25 on: May 16, 2019, 07:36:54 PM »
Just in time before PowerBasic vendors and users start jumping off buildings.  ;D

Thats a bit cruel, you know? :D


JRS

  • Guest
Re: Goto label inside a select case block?
« Reply #26 on: May 16, 2019, 07:52:04 PM »
How does it feel to be a hero?

Brian Alvarez

  • Guest
Re: Goto label inside a select case block?
« Reply #27 on: May 16, 2019, 08:32:53 PM »
?