GOTO¶
Syntax¶
Versions: 8K, Extended, Disk
Purpose¶
To branch unconditionally out of the normal program sequence to a specified line number.
Remarks¶
If
Example¶
LIST
10 READ R
20 PRINT "R =" :R,
30 A = 3.l4*R .... 2
40 PRINT "AREA =" :A
50 GOTO 10
60 DATA 5,7,12
Ok
RUN
R = 5 AREA = 78.5
R = 7 AREA = 153.86
R = 12 AREA = 452.16
?Out of data in 10
Ok
See Also¶
- FOR...NEXT - Execute statements repeatedly with a loop counter
- GOSUB...RETURN - Branch to and return from a subroutine
- IF...THEN...ELSE - Make decisions and control program flow based on conditional expressions
- ON...GOSUB/ON...GOTO - Branch to one of several line numbers based on an expression value
- WHILE...WEND - Execute statements in a loop while a condition is true