Back on my C64 now, looking back, how silly, but a DATA set to hold a move collection was my first start in understanding data structures. Not my exact code, but the code was basically like this.
10 REM VHS Collection Search
20 DIM T$(5)
30 FOR I = 1 TO 5
40 READ T$(I)
50 NEXT I
60 INPUT "Enter VHS title to search: ", S$
70 FOR I = 1 TO 5
80 IF T$(I) = S$ THEN PRINT "Title found: "; T$(I)
90 NEXT I
100 END
110 DATA "Star Wars", "Back to the Future", "The Terminator", "Ghostbusters", "Indiana Jones"
Oh line numbers and goto
At every place there was a C64 I would run over and type
10 PRINT "TIM",,,,,,
20 GOTO 10
No comments:
Post a Comment