JKEYAUTO GOSUB

Man Page Index


Description

Transfer execution of the script to a specified label, but as a subroutine call, so we can RETURN from there.

 

Syntax

gosub label

label is the label to which execution should transfer.

 

Example

gosub loadprog
if exitcode ne 0 then exit exitcode
# Any other code
exit 0
#
loadprog: progname = "TESTER " : $VARNAME : " " : portno
portno = portno + 1
program loadprog
exitcode = $?
Return


JKEYAUTO