Problem with float...

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
PIC_Man
Flowcode V4 User
Posts: 2
Joined: Tue Aug 09, 2011 10:35 am

Problem with float...

Post by PIC_Man »

i have created a c-file like the tutorial flowcode 4 , a simple operation with floating point numbers( variable type float). there are no error during compilation, but when used the simple operation like +, - , * , /, the result was wrong and the lcd shows -1.///////.
the lcd in flowcode-simulation shows 0.000000.
the same problem is in the macro. only the functions fadd(),fmul() a.s.o. works correct. i have no idea about the reason.can you help me??

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: Problem with float...

Post by DavidA »

Hello,

Please post in the Flowcode V4 forums as you state you use Flowcode V4.

Help on how to do this is available here:

http://www.matrixmultimedia.com/support ... f=29&t=602

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: Problem with float...

Post by DavidA »

Thank you for registering as a V4 user!

Please post your Flowcode file for us to look at for you.

PIC_Man
Flowcode V4 User
Posts: 2
Joined: Tue Aug 09, 2011 10:35 am

Re: Problem with float...

Post by PIC_Man »

Please see the file in the attachment....
Testumgebung_PIC16XXXX_C.fcf
(6 KiB) Downloaded 226 times

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: Problem with float...

Post by DavidA »

Hello,

You have written the calculation in a c-code block rather than a calculation block, I have attacvhed a working version for you to look at.
Testumgebung_PIC16XXXX_C.fcf
(6 KiB) Downloaded 281 times

Post Reply