[Gambas-user] Possible suggestion/question

M. Cs. mohareve at ...626...
Fri Mar 2 12:37:38 CET 2012


I red somewhere that GOTO is something that a good programer should
avoid at all costs.
GOTO is a host of countless bug possibilities.

2012/3/2, John Spikowski <support at ...2529...>:
> On Fri, 2012-03-02 at 03:31 +0100, Benoît Minisini wrote:
>> Anyway, there is a syntax problem. In Basic, GOSUB is ended by a RETURN
>> instruction, but RETURN is already used to exit the all function. Or
>> maybe RETURN will return from the function only if there is no pending
>> GOSUB.
>>
> Most Basic languages allow exiting a GOSUB and not RETURNing. GOTO is
> pretty smart in SciptBasic and used to prematurely exit any stack
> tracking structure and cleans up on the way out.
>
> In ScriptBasic the function name is used rather then RETURN.
>
> FUNCTION myfunc ()
>
>  myfunc = 1
>
> END FUNCTION
>
>
>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list