File size: 1,064 Bytes
a2a15a2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
10 REM "Array test program"
20 REM "Dimensioning, storing and recalling"
30 REM "Arrays are dimensioned with DIM like A(), B()"
40 REM "Arrays autodimension to size 10 like C()"
50 REM "@E() is the EEPROM array"
60 REM "@() is the end of memory array"
100 DIM B(28)
110 DIM A(18)
200 PRINT "Testing indexing A(I), B() is zero"
210 FOR I=1 TO 18
220 A(I)=I*I
230 NEXT
240 FOR I=1 TO 18
250 PRINT I, A(I), "=", I*I
260 NEXT
270 FOR I=1 TO 28
280 PRINT I, B(I), "=", 0
290 NEXT
300 PRINT "Testing A(2)"
310 A(2)=127 
320 PRINT #4, A(2), "= 127"
400 PRINT "Autodimensioning C"
410 FOR I=1 TO 10 
420 C(I)=RND(I)
430 NEXT
440 FOR I=1 TO 10
450 PRINT I, C(I)
460 NEXT
500 PRINT "Testing B() and @()"
510 FOR I=1 TO 10 
520 B(I)=I*6: @(I)=I*6
530 NEXT 
540 PRINT "Size of memory array=", @
550 FOR J=1 TO 4 
560 PRINT #3,J,B(J),@(J);" = ";6*J
570 NEXT 
600 PRINT "Testing EEPROM"
610 PRINT "Size of EEPROM array=", @E
620 IF @E=0 THEN PRINT "No EEPROM" : END
630 FOR I=1 TO 10 
640 @E(I)=I*I 
650 NEXT 
660 FOR J=1 TO 10 
670 PRINT #3,J,@E(J);" = ";J*J
680 NEXT 
700 END