Page 1 of 1

How to read specific digit of an INT variable?

Posted: Thu May 07, 2015 7:50 am
by hyperion007
How would one best go about this problem?

Let's say INT_var = 12345

Now how do I take that and turn it into this:
These are all byte variables.

Digit0 = 5
Digit1 = 4
Digit2 = 3
Digit3 = 2
Digit4 = 1

Re: How to read specific digit of an INT variable?

Posted: Thu May 07, 2015 8:10 am
by medelec35
Hi hyperion007
This post should help.

Martin