[Gambas-user] On Goto/GoSub allow multiple line
Benoît Minisini
g4mba5 at gmail.com
Fri Feb 26 19:52:52 CET 2021
Le 26/02/2021 à 10:02, KKing a écrit :
>> on x goto or on x gosub to have multiple line entries
>>
>> on x goto lable1, label2, label3, label4
> could you explain the usage for gosub I could imagine you are saying for
> certain condition do all these sub routines?
> But from traditional sense don't see the relevance of multi destinations
> for an on goto.
>
"On Goto" and "On Gosub" are a way to implement a fast "Select Case".
Moreover, it is optimized by the JIT compiler, using jump tables.
It is used in the IDE to speed up the analyze of files generated by the
profiler.
Regards,
--
Benoît Minisini
More information about the User
mailing list