support for floor(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
billduck
Posts: 162
Joined: Thu Jul 01, 2010 1:57 am
Has thanked: 23 times
Been thanked: 16 times
Contact:

support for floor(float)

Post by billduck »

I have written a program, in which I use use the floor(float) function in a decision branch. It runs in simulation mode, as I want. But it will not compile. The message is
" MoveAZ_6_10Works_RS232.c:(.text+0x17a): undefined reference to `float32_to_int32_round_down' " ,with no further detail. I might add, that I prototyped the subroutine, using an 6 pin connection LCD, without regard to what pins to which it is connected. I re-wrote the program for a serial LCD, like I have on the microcontroller, and got the same results.
Thanks in advance.
Attachments
MoveAZ_6_10WorksB.fcf_avr
Program for 6 connection LCD
(11 KiB) Downloaded 282 times

billduck
Posts: 162
Joined: Thu Jul 01, 2010 1:57 am
Has thanked: 23 times
Been thanked: 16 times
Contact:

Re: support for floor(float)

Post by billduck »

Attached is a much simpler and short program, showing the same message, as it does not compile:"Floor.c:(.text+0xf4): undefined reference to `float32_to_int32_round_down'".
Thanks.
Attachments
Floor.fcf_avr
(5 KiB) Downloaded 277 times

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: support for floor(float)

Post by Benj »

Hello,

Please can you try copying the attached file into your "Flowcode AVR v4/FCD" folder and this should then allow you to compile the function correctly.
Attachments
internals.c
(27 KiB) Downloaded 261 times

billduck
Posts: 162
Joined: Thu Jul 01, 2010 1:57 am
Has thanked: 23 times
Been thanked: 16 times
Contact:

Re: support for floor(float)

Post by billduck »

Thanks. I was working on a solution, where I cast a float as an integer. Seemed to get around the floor anomily.

Post Reply