Flowcode math problem 32/64 bit vs 8/16bit

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

Moderators: Benj, Mods

Post Reply
Nolan
Posts: 1
Joined: Mon Mar 19, 2007 9:49 am
Location: Cape Town, South Africa
Contact:

Flowcode math problem 32/64 bit vs 8/16bit

Post by Nolan »

I have picked up a "bug" in Flowcode. When calculating a value say for instance:

Voltage = (ADC_VAL*5000)/1023

The simulator runs correctly. However, when dumping the code onto a pic overflow occurs. This is because the simulator uses the PC's 32/64 bit processor to calculate the value. The following works well though:

Voltage = ADC_VAL*(5000/1023)

I would like to see flowcode check and compensate for erros like this.

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:

Post by Benj »

Thanks for the info Nolan. We will see what we can do about this problem.

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Post by Steve »

Nolan,

I've just fixed this bug. It will be available in the v3.2 release later this week.

Post Reply