Option Gosub
Enables support for `GoSub` and `On Gosub`.
Syntax
`
Option Gosub
`
Description
`Option Gosub` enables support for `GoSub` and `Return` (from gosub).
Because `Return` could mean return-from-gosub or return-from-procedure, `Option Gosub` and `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
Option GoSub
GoSub there
backagain:
Print "backagain"
End
there:
Print "there"
Return
`
Dialect Differences

- Only available in the -lang fblite and -lang qb dialects.

Differences from QB

- New to FreeBASIC

See also

- `__Fb_Option_Gosub__`
- `Option Nogosub`
- `GoSub`
- `Return`