Casio FX-890P Owner's Manual page 52

Casio personal computer owner's manual
Table of Contents

Advertisement

ON GOSUB
PURPOSE: Jumps to a specified subroutine in accordance with a specified
branching condition.
FORMAT:
ON
Condition
Numeric expression
EXAMPLE: ON A GOSUB 1000, 1100, 1200
PARAMETERS:
1. Branch condition: Numeric expression truncated to an integer
2. Branch destination line number: integer in the range of 1≤ line number ≤65535
3. Program area number: single character, 0-9
4. Label: Name of a label in the program.
EXPLANATION:
1. The GOSUB statement is executed in accordance with the value of the
expression used for the branch condition. For example, execution jumps to the
first branch destination when the value is 1, to the second destination when
the value is 2 etc.
2. Program execution does not branch and execution proceeds to the next
statement when the value of the condition is less than 1, or if a branch
destination corresponding to the value does not exist.
3. Up to 99 branch destinations may be specified.
SEE: RETURN
branch destination line number
GOSUB [
# program area number
branch destination line number
[ , [
Line number
Single character; 0-9
*Label
Label name
Line number
# program area number
Single character; 0-9
*Label
Label name
52
P
0
]
] ]*

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Z-1grZ-1

Table of Contents