Skip to content

Commit 28b53be

Browse files
committed
Correct error in GOTO10
1 parent 9d9adcb commit 28b53be

1 file changed

Lines changed: 20 additions & 18 deletions

File tree

README.md

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -396,18 +396,17 @@ Here is an extreme example.
396396
1 I=-1
397397
10 I=I+1: IF I MOD 1000 THEN 10 ELSE I=0
398398
10 PRINT: PRINT
399-
10 PRINT "This is line ten."
399+
10 PRINT "This is line ten. ";
400400
10 PRINT "This is also line ten."
401401
5 PRINT "Line five runs after line ten."
402-
10 PRINT "Where would GOTO 10 go?"
403-
15 PRINT " (The following line is 7 GOTO 10)"
402+
10 PRINT "Where would 7 GOTO 10 go?"
404403
7 GOTO 10
405404
8 ERROR "Line 8 is skipped by GOTO 10."
406-
10 PRINT: PRINT "It goes to the *next* line ten!"
405+
10 PRINT: PRINT " It goes to the *next* line ten!"
407406
10 FOR T=0 TO 1000: NEXT T
408-
10 PRINT "Exceptions: Goes to *first* line ten"
409-
10 PRINT " if the current line is ten, or"
410-
10 PRINT " if a line number > 10 is seen."
407+
10 PRINT "However, it searches from the top when"
408+
10 PRINT " A) 10 GOTO 10, or"
409+
10 PRINT " B) a line number > 10 is seen."
411410
10
412411
10 'Shouldn't 10 GOTO 10 go to itself?
413412
10 'It shouldn't have to search at all.
@@ -422,23 +421,26 @@ Here is an extreme example.
422421
10 PRINT
423422
10 PRINT "The next line is 9 GOTO 10. This time"
424423
10 PRINT "it goes to the FIRST line ten, because"
425-
10 PRINT "line 20 comes before the next line ten."
424+
10 PRINT "line 20 comes before the next line ten.";
426425
9 GOTO 10
427426
20 ERROR "Line 20 is never reached, but it has an effect because 20>10."
428427
10 ERROR "This is the final line ten. The previous GOTO 10 won't find it because line 20 comes first."
429428
10
430429
15
431430
20
432-
0 PRINT "This program examines how"
433-
1 PRINT "Model T computers run"
434-
2 PRINT "degenerate tokenized BASIC."
435-
3 PRINT "Trying to load it as a .DO"
436-
4 PRINT "file will not work as"
437-
5 PRINT "Tandy BASIC corrects issues"
438-
6 PRINT "such as duplicate line numbers"
439-
7 PRINT "and out of order lines."
440-
8 PRINT "Please use hackerb9's"
441-
9 PRINT "pre-tokenized GOTO10.BA."
431+
0 PRINT "This program examines how Model T com-"
432+
1 PRINT "puters run degenerate tokenized BASIC."
433+
2 PRINT
434+
3 PRINT "Loading it as a .DO file will not work."
435+
4 PRINT "Tandy BASIC corrects issues such as"
436+
5 PRINT "out of order or duplicate line numbers."
437+
6 PRINT
438+
7 PRINT "Please create GOTO10.BA:"
439+
8 PRINT " m100-tokenize GOTO10.DO >GOTO10.BA"
440+
9 PRINT
441+
10 PRINT "Or use the pre-tokenized GOTO10.BA at:"
442+
15 PRINT " github.com/hackerb9/tokenize/"
443+
20 PRINT " raw/main/degenerate/GOTO10.BA"
442444
```
443445

444446
To run this on a Model 100, one must download the tokenized BASIC file,

0 commit comments

Comments
 (0)