Two dimensional array- or something like that? Help please?
Rforbes
Posts: 281
Hey all,
I'm getting stumped here. I think this should be simple but it's kicking my.... uh, well... anyway.
Here's my code example
I'm trying to figure out how to eliminate the need to create Temp_0 thru Temp_5 as I've done above and instead use something like Temp_[6][6] ... I know this doesn't work, but I think it conveys my meaning- to create 6 arrays of 6 arrays.
If that isn't possible, I had at least hoped to be able to access the variables as I have them written by using something like this:
And of course that doesn't work either.
Am I missing something obvious here?
Thanks in advance,
Robert
I'm getting stumped here. I think this should be simple but it's kicking my.... uh, well... anyway.
Here's my code example
Var Byte Temp_0[6] Byte Temp_1[6] Byte Temp_2[6] Byte Temp_3[6] Byte Temp_4[6] Byte Temp_5[6] PUB Main | i repeat i from 0 to 6 Temp_0[i]:= i
I'm trying to figure out how to eliminate the need to create Temp_0 thru Temp_5 as I've done above and instead use something like Temp_[6][6] ... I know this doesn't work, but I think it conveys my meaning- to create 6 arrays of 6 arrays.
If that isn't possible, I had at least hoped to be able to access the variables as I have them written by using something like this:
PUB Main|i repeat i from 0 to 6 Temp_[i][0]:= i
And of course that doesn't work either.
Am I missing something obvious here?
Thanks in advance,
Robert
Comments
Try something like this...
dgately
http://forums.parallax.com/showthread.php?144293-How-to-Save-variables-to-onboard-EEPROM-on-Proto-Board&p=1146765&viewfull=1#post1146765
Robert