Decimal Point

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

Moderators: Benj, Mods

Post Reply
PINTO
Flowcode v5 User
Posts: 71
Joined: Fri Nov 03, 2006 2:28 pm
Location: RSA
Been thanked: 1 time
Contact:

Decimal Point

Post by PINTO »

Hello Ben,

I need to measure a DC voltage from 0 to 25V and print a value on the lcd with two decimal places (eg. "00.00 Vdc")
The decimal must be fixed.
How do I split the number?

Thanks


Pinto

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Decimal Point

Post by Benj »

Hello Pinto

The floating point example should be useful to you here as it prints out numbers with decimal points and fractional values.

http://www.matrixmultimedia.com/Flowcode_Examples.php

jimhumphries
Posts: 112
Joined: Wed Oct 12, 2005 6:29 pm
Location: USA
Been thanked: 1 time
Contact:

Re: Decimal Point

Post by jimhumphries »

Pinto:

I use the attached macros to parse a three digit number and then to display the number with either 1 or 2 places to the right of the DP.

Hope this is helpful.

Jim
=========================================================
No attached files:

Pinto:

Well - sorry, apparently I am not allowed to upload .fcn files.
=========================================================

Thanks Ben! That's fixed.

To use/view these, save to disk then import them as macros into a new Flowcode session.

Jim
PARSE_NUMBER.fcm
(1.2 KiB) Downloaded 527 times
DP_NUMBER1.fcm
(724 Bytes) Downloaded 468 times
DP_NUMBER2.fcm
(724 Bytes) Downloaded 441 times

PINTO
Flowcode v5 User
Posts: 71
Joined: Fri Nov 03, 2006 2:28 pm
Location: RSA
Been thanked: 1 time
Contact:

Re: Decimal Point

Post by PINTO »

Hi Jim,

Thanks the macros helped a lot.
Thank you

Regards


Pinto

jimhumphries
Posts: 112
Joined: Wed Oct 12, 2005 6:29 pm
Location: USA
Been thanked: 1 time
Contact:

Re: Decimal Point

Post by jimhumphries »

Pinto:

Glad that was helpful.

Regards,

Jim

Post Reply