I Want 2 Learn 2‎ > ‎Xtra‎ > ‎

Example Program

An example program that I quickly put together for another purpose reproduced here 

With no REMark statements to help you understand the program (this was deliberate) and help you appreciate the need for REM statement in your program 

100 MODE 4:WINDOW 512,256,0,0:PAPER 2:INK 0:CLS:d=DATE:RANDOMISE d
110 PAPER 4:CSIZE 2,1:CURSOR 1,11:PRINT " E P I C   M o v i e   T i t l e r ":INK 7
120 OVER 1:CURSOR 0,10:PRINT " E P I C   M o v i e   T i t l e r ":CSIZE 1,0:PRINT
130 PRINT "  Original(O), Prequel(P), Sequel(Q)"
140 REPeat loop:I$=INKEY$:IF I$>="o" AND I$<="q" THEN EXIT loop:END FOR loop

150 :
160 IF I$="o":RESTORE 310
170 IF I$="p":RESTORE 370
180 IF I$="q":RESTORE 340
190  a=1+INT(RND*10):                     FOR f=1 TO a:READ aa$:END FOR f
200  b=1+INT(RND*10):RESTORE 270: FOR f=1 TO b:READ bb$:END FOR f
210  c=1+INT(RND*10):RESTORE 280: FOR f=1 TO c:READ cc$:END FOR f

220 :
230 CSIZE 2,0:CURSOR 11,101:PAPER 7:INK 0:OVER 0
240 PRINT " ";bb$;" ";cc$;" :";:CSIZE 1,0:PRINT aa$;" ":INK 4:OVER 1:CURSOR 10,100:CSIZE 2,0
250 PRINT " ";bb$;" ";cc$;" :":INK 0:CSIZE 0,0:PRINT:PRINT "       Coming Soon..."
260 :
270 DATA "Sonic","Transporting","Red","Happy","Great","Wet","Family","Great","Super","Sky"
280 DATA "Armada","Weekend","Saturdays","Engagement","Tears","Warrior","Walker","Wars","Shepherd","Diver"
290 :

300 :
310 DATA "Insurgence","Episode 1","Episode 4","The Awakening","The Movie","","The Motion Picture","An Original Story","Conflict at Moore's Rock","First Blood"
320 :

330 :
340 DATA "the Sequel","II","the Return","Revisited","Second Coming","Second Encounter","Next Generation","Returns","Again","is Back"
350 :

360 :
370 DATA "First Born","The Early Years","The Beginning","Young Guns","Starting Point","1st Generation","The Rise","Dawn","Initial Steps","The Calling"