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'
C in flowcode
-
- Posts: 14
- Joined: Thu Apr 17, 2008 10:10 am
- Contact:
- 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
Hello
Which version of Flowcode are you using (PIC/AVR/ARM)?
Which version of Flowcode are you using (PIC/AVR/ARM)?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 14
- Joined: Thu Apr 17, 2008 10:10 am
- Contact:
- 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
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
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
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel