SubName
is the line label of a subroutine.
Purpose
Κ
To branch to one of several specified Line Labels depending
on the value of an expression.
Syntax
Κ
ON N% GOTO LineLabel | LineNumber {,LineLabel |
LineNumber}
Example
Κ
D% = DAY_OF_WEEK
ON D% GOTO 1, 2, 3, 4, 5, 6, 7
1
PRINT "MONDAY"
END
2
PRINT "TUESDAY"
END
3
PRINT "WEDNESDAY"
END
4
PRINT "THURSDAY"
END
5
PRINT "FRIDAY"
END
6
PRINT "SATURDAY"
END
7
PRINT "SUNDAY"
END
Description
Κ
N%
is a numeric expression which is rounded to an
integer.The value of N% determines which line lable in the
list will be used for branching. If the value N% is 0 or greater
than the number of line labels listed,the interpreter will
continue with the next executable statement.
LineLabel
is the string label of a program line.
LineNumber
is the integer number in front of a program line.
T P C 7 0 3 0
Programming Manual Ver. 1.00
21/131