Your absolutly right about that. One of the graces I have found with DIG is if the digit does not exest (like Dig 9), it returns a 0.. So so far everything looks fine until the word variably I have maxs out at 65535.
Since a 16 bit word is not big enough I have to store half in one word variable and the other half in another.
Some simple code:
OdCountL = OdCountL + 1 ' Increment Low Word Count
If OdCountL = 10000 then ' Roll Over at 9999 (999.9)
OdCountH = OdCountH + 1 ' Increment High Word Count
If OdCountH = 1000 Then ' Roll Over at 999 (999 + 999.9)
OdCountH = 0 ' Zero the High Word Counter
Endif
OdCOuntL = 0 ' Zero the low word counter
Endif
....
For lcount = 0 to 3
MsgBuff[9 - Lcount] = OdCountL dig lcount + 48
Next
For lcount = 0 to 2
MsgBuff[5 - Lcount] = OdCountH dig lcount + 48
Next
Bookmarks