User Tools

Site Tools


sd:sd-8516_user_s_guide

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
sd:sd-8516_user_s_guide [2026/04/14 06:09] – external edit (Unknown date) 127.0.0.1sd:sd-8516_user_s_guide [2026/04/19 20:43] (current) appledog
Line 740: Line 740:
 === READ, DATA, RESTORE === READ, DATA, RESTORE
 If you have large amounts of data that you need to store for your program, you can use DATA. If you have large amounts of data that you need to store for your program, you can use DATA.
-10 DATA 1, 2, 3, 5, 6, 7, 8, 9, 10, 11 
-20 FOR I = 1 TO 10 
-30 READ A 
-40 PRINT I, A 
-50 NEXT I 
  
 +    10 DATA 1, 3, 5, 7, 9, 10, 11, 12, 13, 15
 +    20 FOR I = 1 TO 10
 +    30 READ A
 +    40 PRINT I, A
 +    50 NEXT I
 +
 +You can also have DATA at the end of the program; this works too:
 +
 +    20 FOR I = 1 TO 10
 +    30 READ A
 +    40 PRINT I, A
 +    50 NEXT I
 +    100 DATA 2, 3, 4, 5, 10, 20, 30, 50, 70, 99
 +
 +//NOTE: DATA is currently BROKEN. It only uses the first line of DATA. I will fix this for the May 4th 2026 update.//
 +
 +Examples of DATA you can store could be:
 +
 +* Pixels for an image or a sprite
 +* Monster data
 +* Maps for an adventure game
 +* Musical notes
 +* Secret data (i.e. ASCII encoded text, so people don't cheat by LISTing your program!)
  
 === MATH functions === MATH functions
Line 902: Line 920:
     20 IF A = 0 GOTO 60     20 IF A = 0 GOTO 60
     30 PRINT "You typed: ", A     30 PRINT "You typed: ", A
-    40 P RINT ""+    40 PRINT ""
     50 GOTO 10     50 GOTO 10
     60 PRINT "END OF LINE"     60 PRINT "END OF LINE"
Line 995: Line 1013:
     5300 REM MOVE PLAYER RIGHT     5300 REM MOVE PLAYER RIGHT
     5310 LET PX = PX + 1     5310 LET PX = PX + 1
-    5320 IF Px > 38 THEN PX = 38+    5320 IF PX > 38 THEN PX = 38
     5330 RETURN     5330 RETURN
 </codify> </codify>
Line 1012: Line 1030:
     120 REM GET PLAYER INPUT     120 REM GET PLAYER INPUT
     130 GOSUB 2000     130 GOSUB 2000
-    140 CHECK COLLISION+    140 REM CHECK COLLISION
     150 IF PX = RX THEN IF PY = RY THEN GOTO 4000     150 IF PX = RX THEN IF PY = RY THEN GOTO 4000
     180 REM LOOP UNTIL QUIT     180 REM LOOP UNTIL QUIT
Line 1030: Line 1048:
     1110 LET PC = ASC("@")     1110 LET PC = ASC("@")
     1120 LET RC = ASC("r")     1120 LET RC = ASC("r")
-    1200 CHARXY PX, PY, ASC("@") +    1200 CHARXY PX, PY, PC 
-    1300 CHARXY RX, RY, ASC("r")+    1300 CHARXY RX, RY, RC
     1900 RETURN     1900 RETURN
          
Line 1069: Line 1087:
     5420 PRINT "QUIT GAME"     5420 PRINT "QUIT GAME"
     5430 PRINT "THANK YOU FOR PLAYING!"     5430 PRINT "THANK YOU FOR PLAYING!"
-    5430 END+    5440 END
 </codify> </codify>
  
sd/sd-8516_user_s_guide.1776146946.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki