I'll take a stab, untested, but does compile,
Code:
MyData var byte[5] 'Data array
Multiplier var byte 'Base ten multiplier
Index var byte 'Array index
Multiplier = 1 'Initialize the variable
For Index = 4 to 0 step - 1 'data is left justified, with non digits at right end
If MyData[Index] > 48 AND MyData[index] < 59 Then 'ascii 0 to 9
MyData[Index] = MyData[Index]-48 * Multiplier
Multiplier = [Multiplier * 10] 'ones, tens, hundreds, thousands...
ENDIF
NEXT Index
Then just but the bytes into your long variable in whatever order you like.
Hope this helps,
Jerry
Bookmarks