Revision history for KeyPgGosub


Revision [21452]

Last edited on 2016-05-06 08:35:23 by fxm [Added link to Labels]
Additions:
- ##[[ProPgLabels|Labels]]##


Revision [20257]

Edited on 2016-02-10 16:00:59 by DkLwikki [Update link format]
Additions:
Execution jumps to a subroutine marked by a line label. Always use ##[[KeyPgReturn|Return]]## to exit a ##**Gosub**##, execution will continue on next statement after ##**Gosub**##.
The line label where ##**Gosub**## jumps must be in the same main/function/sub block as ##**Gosub**##. All the variables in the subroutine are shared with the block, no arguments can be used. For this reason Gosub is considered bad programming practice as it can generate unreadable and untraceable code. It is better to use ##[[KeyPgSub|Sub]]## or ##[[KeyPgFunction|Function]]## instead.
- Only available in the //[[CompilerOptlang|-lang qb]]// and //[[CompilerOptlang|-lang fblite]]// dialects.
- ##**Gosub**## support is disabled by default in the //[[CompilerOptlang|-lang fblite]]// unless the ##[[KeyPgOptiongosub|Option Gosub]]## statement is used.
- None when using the //[[CompilerOptlang|-lang qb]]// dialect.
- ##[[KeyPgGoto|Goto]]##
- ##[[KeyPgReturn|Return]]##
- ##[[KeyPgSub|Sub]]##
- ##[[KeyPgFunction|Function]]##
- ##[[KeyPgOptiongosub|Option Gosub]]##
Deletions:
Execution jumps to a subroutine marked by a line label. Always use ##[[KeyPgReturn Return]]## to exit a ##**Gosub**##, execution will continue on next statement after ##**Gosub**##.
The line label where ##**Gosub**## jumps must be in the same main/function/sub block as ##**Gosub**##. All the variables in the subroutine are shared with the block, no arguments can be used. For this reason Gosub is considered bad programming practice as it can generate unreadable and untraceable code. It is better to use ##[[KeyPgSub Sub]]## or ##[[KeyPgFunction Function]]## instead.
- Only available in the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects.
- ##**Gosub**## support is disabled by default in the //[[CompilerOptlang -lang fblite]]// unless the ##[[KeyPgOptiongosub Option Gosub]]## statement is used.
- None when using the //[[CompilerOptlang -lang qb]]// dialect.
- ##[[KeyPgGoto Goto]]##
- ##[[KeyPgReturn Return]]##
- ##[[KeyPgSub Sub]]##
- ##[[KeyPgFunction Function]]##
- ##[[KeyPgOptiongosub Option Gosub]]##


Revision [13562]

Edited on 2008-07-21 15:43:47 by JeffMarshall [added #lang or $lang to example]
Additions:
'$lang: "qb"
GoSub message
End
Print "Welcome!"
Return
Deletions:
gosub message
end
print "Welcome!"
return


Revision [13339]

The oldest known version of this page was created on 2008-05-08 07:43:25 by JeffMarshall [added #lang or $lang to example]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode