How to read specific digit of an INT variable?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

hyperion007
Posts: 528
Joined: Sat Dec 01, 2012 1:23 pm
Location: Sweden
Has thanked: 49 times
Been thanked: 101 times
Contact:

How to read specific digit of an INT variable?

Postby hyperion007 » Thu May 07, 2015 7:50 am

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

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8472
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2433 times
Been thanked: 3482 times
Contact:

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

Postby medelec35 » Thu May 07, 2015 8:10 am

Hi hyperion007
This post should help.

Martin
These users thanked the author medelec35 for the post:
hyperion007 (Thu May 07, 2015 8:12 am)
Rating: 5.26%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.