Revision history for KeyPgOngosub
Revision [24283]
Last edited on 2020-08-13 03:29:42 by fxm [splitted Return-from-gosub and Return-from-proc]Additions:
This statement behaves exactly like ##[[KeyPgGosub|Gosub]]## and execution may return to the statement following the ##**On...Gosub**## using ##[[KeyPgReturnGosub|Return]]##.
- ##[[KeyPgReturnGosub|Return (from Gosub)]]##
- ##[[KeyPgReturnGosub|Return (from Gosub)]]##
Deletions:
- ##[[KeyPgReturn|Return]]##
Revision [21924]
Edited on 2017-09-29 12:51:41 by fxm [Added (in ยง"See also") a link to the "Labels" page]Additions:
- ##[[ProPgLabels|Labels]]##
No Differences
Additions:
This statement behaves exactly like ##[[KeyPgGosub|Gosub]]## and execution may return to the statement following the ##**On...Gosub**## using ##[[KeyPgReturn|Return]]##.
It is recommended that the structured ##[[KeyPgSelectcase|Select Case]]## conditional statement be used instead of ##**On...Gosub**##.
- Only available in the //[[CompilerOptlang|-lang qb]]// and //[[CompilerOptlang|-lang fblite]]// dialects.
- ##**On Gosub**## support is disabled by default in the //[[CompilerOptlang|-lang fblite]]// unless the ##[[KeyPgOptiongosub|Option Gosub]]## statement is used.
- ##[[KeyPgSelectcase|Select Case]]##
- ##[[KeyPgOngoto|On...Goto]]##
- ##[[KeyPgGosub|Gosub]]##
- ##[[KeyPgReturn|Return]]##
- ##[[KeyPgOptiongosub|Option Gosub]]##
It is recommended that the structured ##[[KeyPgSelectcase|Select Case]]## conditional statement be used instead of ##**On...Gosub**##.
- Only available in the //[[CompilerOptlang|-lang qb]]// and //[[CompilerOptlang|-lang fblite]]// dialects.
- ##**On Gosub**## support is disabled by default in the //[[CompilerOptlang|-lang fblite]]// unless the ##[[KeyPgOptiongosub|Option Gosub]]## statement is used.
- ##[[KeyPgSelectcase|Select Case]]##
- ##[[KeyPgOngoto|On...Goto]]##
- ##[[KeyPgGosub|Gosub]]##
- ##[[KeyPgReturn|Return]]##
- ##[[KeyPgOptiongosub|Option Gosub]]##
Deletions:
It is recommended that the structured ##[[KeyPgSelectcase Select Case]]## conditional statement be used instead of ##**On...Gosub**##.
- Only available in the //[[CompilerOptlang -lang qb]]// and //[[CompilerOptlang -lang fblite]]// dialects.
- ##**On Gosub**## support is disabled by default in the //[[CompilerOptlang -lang fblite]]// unless the ##[[KeyPgOptiongosub Option Gosub]]## statement is used.
- ##[[KeyPgSelectcase Select Case]]##
- ##[[KeyPgOngoto On...Goto]]##
- ##[[KeyPgGosub Gosub]]##
- ##[[KeyPgReturn Return]]##
- ##[[KeyPgOptiongosub Option Gosub]]##
Additions:
'$lang: "qb"
On choice GoSub labela, labelb, labelc
Print "Good bye."
End
Print "choice a"
Return
Print "choice b"
Return
Print "choice c"
Return
On choice GoSub labela, labelb, labelc
Print "Good bye."
End
Print "choice a"
Return
Print "choice b"
Return
Print "choice c"
Return
Deletions:
print "Good bye."
end
print "choice a"
return
print "choice b"
return
print "choice c"
return