Help Center
Help CenterFreeBASIC

Option Nogosubkeyword

Disables support for GoSub and On Gosub.

Compiler Switcheskeyworddocumented

Syntax

Option Nogosub

Description


Option Nogosub disables 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.

Remarks

Dialect Differences


Differences from QB


  • New to FreeBASIC

See also


Example


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



'$lang: "qb"



'' turn off gosub support

Option nogosub



Function foo() As Integer

    Return 1234

End Function



Print foo


Reference

  • Documented in KeyPgOptionnogosub.html