Hello Russ. Sounds like you want to do:
Code:
looper var byte ; something to use in loops < 256
Med = byte(14) ; creates a 14 byte array, Med(0) to Med(13)
Sensor var byte ; byte space for "Sensor"
Thigh1 var byte ; byte space for "Thigh1"
For looper = 0 to 13
Med(looper) = looper ; fill each "Med" array cell with looper value, so Med(0) = 0, Med(1) = 1, Med(2) = 2, etc.
next
Sensor = Med(3) ; Sensor now equals 3
Thigh1 = Med(13) ; Thigh1 now equals 13
END ; just in case
And that's that.
The compiler now sets 17 bytes aside for variable storage. The compiler and run time don't keep track of index values, so you can overrun arrays at will. At this point you could literally refer to Thigh1 as Med(15) in your code, thus:
Sensor = Med(15)
will put Thigh1's value in Sensor. So you have to be careful about that and making loops as above too large. If you had made "looper" 0 to 255 it would have gone deep into your available RAM putting bogus values into bogus array locations.
Take care.