Counter = 0 L1$ = "AAA" : L1 = LEN(L1$) L2$ = "BBBBB" : L2 = LEN(L2$) L3$ = "CCCCCCC" : L3 = LEN(L3$) FOR Counter = 1 TO 3 PRINT Counter, L(Counter) NEXT Counter
Counter = 0 '? Counter is set to 1 when you enter the for next loop dim L(3) 'create the array you intend to use 'store the length to this array, not L1,L2,L3 L1$ = "AAA" : L(1) = LEN(L1$) L2$ = "BBBBB" : L(2) = LEN(L2$) L3$ = "CCCCCCC" : L(3) = LEN(L3$) FOR Counter = 1 TO 3 PRINT Counter, L(Counter) NEXT Counter
|
Counter = 0 L1$ = "AAA" : L1 = LEN(L1$) L2$ = "BBBBB" : L2 = LEN(L2$) L3$ = "CCCCCCC" : L3 = LEN(L3$) FOR Counter = 1 TO 3 PRINT Counter, EVAL("L";Counter) NEXT Counter