10 GOSUB 100
20 GOSUB 300
30 GOSUB 400
90 END
100 REM 
101 REM Exercise the expression evaluator
102 REM
110 PRINT "Numeric and expression evaluation."
115 PRINT "Should be 5: ";
120 PRINT 5+2*3-6
125 PRINT "Should be -3: ";
130 PRINT 15/3+((3*2+2-1+1)*-1)
135 PRINT "Should be a 4-item list: ";
140 PRINT 5,"HELLO WORLD",67,-1
145 PRINT "Functions, first the alphabet: ";
150 FOR I=65 TO 90
155 PRINT CHR(I);
160 NEXT I
161 PRINT
163 PRINT "String funcs, BROAD: ";
165 DIM SAMPLE$(30)
170 LET SAMPLE$="EMERGENCY BROADCAST"
175 PRINT MID(SAMPLE$,11,5)
180 PRINT
190 RETURN
300 REM
301 REM Exercise the READ/DATA/RESTORE functions
302 REM
305 PRINT "Testing READ/DATA Should see series 0..10 then 0..10"
310 FOR I=0 TO 10
315 READ F
320 PRINT F;
330 PRINT " ";
340 NEXT I
350 RESTORE
355 PRINT
360 FOR I=0 TO 10
365 READ H
370 PRINT H;
375 PRINT " ";
379 NEXT I
380 PRINT
381 DIM A$(20)
392 PRINT "And string read (thats all folks):";
383 READ A$
384 PRINT A$
385 RETURN
390 DATA 0, 1, 2, 3, 4, 5
395 DATA 6, 7, 8, 9, 10, "All Done w READ/DATA"
400 REM
401 REM Demonstrate FOR/NEXT looping
402 REM
405 PRINT "First count by 2s, then backwards from 10, then nested 0-3"
410 FOR I=0 TO 10 STEP 2
412 PRINT I;
413 PRINT " ";
415 NEXT I
420 PRINT
425 FOR I=10 TO 0 STEP -1
430 PRINT I;
435 PRINT " ";
440 NEXT I
445 PRINT
450 FOR I=0 TO 3
455 FOR J=0 TO 3
460 PRINT I;
462 PRINT " ";
470 PRINT J;
472 PRINT " ";
475 NEXT J
480 PRINT
485 NEXT I
490 RETURN
