Hi,
The DIG operator should work for that, I can't say why it doesn't work for you. A mathematical way may be:
Code:
Counter var word
Thousands var byte
Hundreds var byte
Tens var byte
Ones var byte
Counter = 5389
Thousands = Counter / 1000 'Thousands is now 5
Counter = Counter - (Thousands * 1000) 'Counter is now 389
Hundreds = Counter / 100 'Hundreds is now 3
Counter = Counter - (Hundreds * 100) 'Counter is now 89
Tens = Counter / 10 'Tens is now 8
Ones = Counter - (Tens * 10) 'Ones is now 9
/Henrik Olsson.
Bookmarks