Programming Manual Keyboard
SATO Europe
42
GOSUB…RETURN
Description
To branch to and return from a subroutine.
Syntax
GOSUB label
Statement block1
Label:
Statement block2
RETURN
Remarks
Label is a tag to mark a specified position in the program. The available maximum
label name is 20 characters. A return statement will cause the program return to the
statement following the GOSUB statement.
The total number of GOSUB…RETURN statements cannot exceed 40 in one
program.
Example
PRINT “MAIN ROUTINE”
GOSUB SUB1
PRINT “MAIN ROUTINE”
END
SUB1:
PRINT “SUBROUTINE”
RETURN
The execution result should be as follows:
OK
MAIN ROUTINE
SUBROUTINE
MAIN ROUTINE
Содержание Smart Keyboard
Страница 1: ...SATO Smart Keyboard Programming manual...
Страница 90: ...Programming Manual Keyboard SATO Europe 88...
Страница 93: ......