-
lists
Hi,
I'm trying to figure a way to simulate a large list, that I can sequentially pick the "next" number from and use it as a variable.
List example:
2
354
9826
55
122
97
So the program would use "2" on the first gosub, "354" the next time and so on. I'm sure somebody has done something like this in PBP and maybe would share?
Cheers
Gary
-
Use LOOKUP2.
Code:
INDEX VAR BYTE
MYVAR VAR WORD
MAIN:
FOR INDEX = 0 TO 5 ' lookup 6 values 0 to 5
LOOKUP2 INDEX,[2,354,9826,55,122,97],MYVAR
GOSUB DOIT
NEXT INDEX
MAIN2:
GOTO MAIN2
DOIT:
' Do something here
HSEROUT [DEC MYVAR,13,10]
RETURN
END
-
lists
Bruce,
Outstanding.
Thank you.