C in flowcode

Any general or miscellaneous queries that do not fit into the other forum catagories

Moderators: Benj, Mods

Post Reply
raghavmonga
Posts: 14
Joined: Thu Apr 17, 2008 10:10 am
Contact:

C in flowcode

Post by raghavmonga »

i tried to implement a c code in flowcode but it showed some errors regarding the floating point value operations.
it does not support float to int conversion.
it gives the following errors on compiling the prog.


float val=0;
int i;
val=FCV_ADC_VALUE*5;
val=val/1024;
val=val*1000;
i=val;
FCV_ADC_VALUE=i;

ERRORS:
operation '=' using operands 'float' and 'float' is not supported
can't convert 'float' to 'signed int'

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: C in flowcode

Post by Benj »

Hello

Which version of Flowcode are you using (PIC/AVR/ARM)?

raghavmonga
Posts: 14
Joined: Thu Apr 17, 2008 10:10 am
Contact:

Re: C in flowcode

Post by raghavmonga »

I am using Flowcode v3 for PIC

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: C in flowcode

Post by Benj »

Hello

This guide to the Floating point libraries should help you to get started with floating point numbers.

http://www.matrixmultimedia.com/support ... .php?t=505

Post Reply