Pre-Populating an Integer Array in Axcess
Greetings,
How do you pre-popultate an Integer array in Axcess?
DEFINE_VARIABLE
INTEGER nARRAY [10][21] (*Create a 10 arrays of 21 integer positions*)
DEFINE_START
nARRAY [1]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21}
nARRAY [2]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21}
...So on and so forth...
This does not work. Any suggestions?
Thanks!
How do you pre-popultate an Integer array in Axcess?
DEFINE_VARIABLE
INTEGER nARRAY [10][21] (*Create a 10 arrays of 21 integer positions*)
DEFINE_START
nARRAY [1]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21}
nARRAY [2]={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21}
...So on and so forth...
This does not work. Any suggestions?
Thanks!
Comments
This will take care of the first two "rows"
DEFINE_VARIABLE INTEGER nARRAY [10][21] = { {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, 20,21}, {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, 20,21} }Joe
This would be dandy in Netlinx, but not in Axcess. TurnipTruck, you're close with your code... only replace the curly braces { } with double quotes " " in your Define_Start section.
--D
Oops. Thanks for the correction, Dave.
Joe
You are on the right track!
With a string array this would be fine but an integer array you will have to set each cells value or use a medium_while to set the values if they are infact incrimental as you show in your example. i.e.
TCOUNT=1
MEDIUM_WHILE(TCOUNT<128)
{ LX_PRE[1][TCOUNT]=TCOUNT
LX_PRE[2][TCOUNT]=TCOUNT+1
TCOUNT=TCOUNT+1
}
If anyone has any other suggestion, please chime in!
Thank you.
cARRAY[21][3]={1,2,3,4...}
I did try:
INTEGER nARRAY[21]="1,2,3...."
It did not give me a compiling error. I have not yet had the time to see if the program will actuall work that way.