Hi,
1. I am still using 2.50. Is the top line (Values VAR BYTE[14]) wanting to use arraywrite? I'm assuming your code, if written out, would be Values.1, Values.2......
No, it does declare an array but it does not use ARRAYWRTITE or ARRAYREAD so you should be fine. The individual values in the array are accessed like Values[0], Values[1] and so on.
2. I already store the 14 byte sized variables into D1, D2, D3....D14. Could this be a direct substitution?
Not directly, no. But if you don't want to re-write your code you can create aliases for each of your variables to actually use the declared array
Code:
Values VAR BYTE[14]
D1 VAR Values[0]
D2 VAR Values[1]
D3 VAR Values[2]
'...and so on.
This way, when you assign a value to D3 it'll actually be stored in the array.
3. Your code states "Values[i]." The "i" would be 14 in this case?
No, i is a variable which is used as the index in the FOR-NEXT loop. First time thru the loop i is 0 so it will access the first value in the array, next time thru the loop i is 1 so it will access the second value in the array and so on. Remember that arrays are indexed starting at 0 so Value[0] is the first value, Value[13] is the 14th value.
4. Last question. When you put a # before the lowvalue and highvalue, what exactly is that doing?
It converts the value to readable ASCII text, it's the same as using the DEC modifier.
/Henrik.
Bookmarks