Casio FX-890P Owner's Manual page 50

Casio personal computer owner's manual
Table of Contents

Advertisement

GOSUB
PURPOSE: Jumps to a specified subroutine.
FORMAT:
branch destination line number
GOSUB
EXAMPLE: GOSUB 100
GOSUB #6
GOSUB *Root
PARAMETERS:
1. Branch destination line number: integer in the range of 1≤ line number ≤65535
2. Program area number: single character, 0-9
3. Label: Name of a label in the program.
EXPLANATION:
1. Program execution branches to the subroutine that starts at the specified line
number or label. Execution is returned from the subroutine by the RETURN
statement.
2. Subroutines can be nested up to 96 levels. Exceeding this value results in an
"OM error"
3. An "UL error" is generated when the specified line number or label name does
not exist.
4. CLEAR command cannot be used within a subroutine.
SEE: RETURN
RETURN
PURPOSE: Returns execution from a subroutine to the main program.
FORMAT: RETURN
EXAMPLE: RETURN
EXPLANATION:
1. Returns program execution to the statement immediately following the
statement that originally called a subroutine.
2. A "GS error" is generated when the RETURN statement is executed without
first executing a GOSUB statement.
SEE: GOSUB, ON GOSUB
Line number
# program area number
Single character; 0-9
*Label
Label name
50
P
0
P
0

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Z-1grZ-1

Table of Contents