Soldato
- Joined
- 9 Nov 2003
- Posts
- 9,515
- Location
- The Motor City
I have a little programme, whose results you can probably easily determine, but it dies after 104,729 with a "Subscript out of range" error. How can I redefine the variable so it accepts much larger numbers?
Code:
1 DIM a(9999): a(1) = 2
2 l = 1
3 t = 3
4 FOR x = 1 TO l: IF a(x) > SQR(t) THEN 7
5 If t / a(x) = INT(t / a(x)) THEN 20
6 NEXT x
7 PRINT t
8 l = l + 1
9 a(l) = t
20 t = t +2
21 GOTO 4