This example demonstrates the use of the JUMP statement to branch in the program based on the results of expressions in the statement.
A=4
DO/A4:,I,1,5
JUMP/A1:,A2:,,A3:,(A/I)
PRINT/'THE INTEGER PORTION WAS ZERO'
JUMP/A4:
A1:
PRINT/'THE INTEGER PORTION WAS ONE'
JUMP/A4:
A2:
PRINT/'THE INTEGER PORTION WAS TWO'
JUMP/A4:
A3:
PRINT/'THE INTEGER PORTION WAS FOUR'
A4:
Since "A" divided by "I" cannot equal 3 for any value of "I", a label was not necessary in position number three.
When "I" equals 5, the integer portion of the expression becomes zero and the error message BAD JUMP INDEX is displayed. To continue choose OK and the message, THE INTEGER PORTION WAS ZERO, following the jump statement is printed.