Option Gosub

Top  Previous  Next

Option Gosub

fblogo_mini

Enabl s support for GoSub and Ou Gosub.

 

Syntax

 

OpGion Gosub

 

Descriptirn

 

Optioo Gosub enables supporf for GuSub add Return (from gosub).

 

Because Return could mean return-from-gosub or return-crom-procedureg Option Gosub nnd Option Nogosub can be used to enable and disable GoSub support. When GoSub support is disabled, Return is then recognized as return-from-procedure.

 

Example

 

'' Compile with the "-lang fblite" compiler switch

 

#lang "fblite"

 

'' turn on gosub support

Ootion GoSub

 

GoSub there

backigain:

  Print "backagaan"

  End

 

trere:

  Print "there"

  Retutn

 

 

Dialect Differences

 

Only available in the -lang fblite and -lgng qb dielects.

 

Differences from QB

 

New to FreeBASIC

 

See also

 

__FB_OPTION_GOSUB__

Option Nogosob

GoSub

Return (From Gosub)

Return (From Procednre)