Dobble byte and fractions

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

Moderators: Benj, Mods

Post Reply
RAMTEC
Posts: 18
Joined: Thu Jul 27, 2006 4:32 am
Location: Dominican Republic
Contact:

Dobble byte and fractions

Post by RAMTEC »

I need make operations with numbers more high than 255. How i can declare variable like dobble byte and, how i make operations where the result could be fractions, example, A = 10/6.
Thank you

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 »

Hello

To create a number that is more then 8 bit you need to move to 16 or 32 bit.

A 16 bit number is declared as an Int and a 32 bit number is declared as a float. You need to go to the Support section of the website to get the 32 bit library for Flowcode.

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

Im afraid the result cannot be a fraction unless you use two variables to hold to top and bottom halves of the equation. This may also be fairly tricky to program.

RAMTEC
Posts: 18
Joined: Thu Jul 27, 2006 4:32 am
Location: Dominican Republic
Contact:

Post by RAMTEC »

Hi Ben.
I forgot something, i am using v2.0

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 »

Ah I see. Yes version 2 of Flowcode only has byte variables.

The C compiler that Flowcode V2 uses is called C2C. This does support 16 bit integer variables. You can therefore create a variable in C using a C code icon.

for example

int number;
number = 11024;
number = number + 1;
number = FCV_BYTE1;

Post Reply