Int-exp is evaluated and if it evaluates to one, the first sub-routine at line no will be executed. If it evaluates to 2, the second GOSUB will be executed. If int-exp evaluates to zero or a number greater than the number of GOSUBs present on the line, program execution will continue on the line following the ON..GOSUB statement.
Program Example.
00100 I = 1
00110 ON I GOSUB 160,180,200
00120 I = I + 1
00130 IF I = 4 THEN GOTO 150
00140 GOTO 110
00150 END
00160 PRINT "I = 1"
00170 RETURN
00180 PRINT "I = 2"
00190 RETURN
00200 PRINT "I = 3"
00210 RETURN