array with floating point numbers

For C and ASSEMBLY users to post questions and code snippets for programming in C and ASSEMBLY. And for any other C or ASM course related questions.

Moderators: Benj, Mods

Post Reply
User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

array with floating point numbers

Post by Jan Lichtenbelt »

Is it possible to declare an array for floating point numbers in the Supplementary Code (under opject options in Flowcode)? If yes, how to use these these floating point variables in the flowcode program? If possible, please give a simple example.

Thanks

Jan Lichtenbelt

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: array with floating point numbers

Post by Benj »

Hello Jan,

You can do this directly through Flowcode.

Create a new variable and set the type to float. Then give it a name and at the end of the name add a set of square brackets contining the number of elements you would like.

eg. float_var[3]

You can then reference the variable by using:

float_var[0]
float_var[1]
float_var[2]

User avatar
Jan Lichtenbelt
Posts: 797
Joined: Tue Feb 17, 2009 8:35 pm
Location: Haren GN, the Netherlands
Has thanked: 128 times
Been thanked: 264 times
Contact:

Re: array with floating point numbers

Post by Jan Lichtenbelt »

Oh, that makes life much easier.

Thanks

Jan

Post Reply