Page 1 of 1

flowcode v2 array

Posted: Thu Apr 03, 2008 3:56 pm
by Jodam
hi I would like learn how to create a simple array with some values in c language.
And How can I integrate the program into the algorigram.
Thanks...

Re: flowcode v2 array

Posted: Fri Apr 04, 2008 11:46 am
by Benj
Hello

To create a simple array in C you would do the following.

char array1[20]; //This defines an unintialised array of 20 bytes indexed 0 - 19

char array2[5] = {0,4,2,'H',0x46}; //This defines an initialised array of 5 bytes indexed 0 - 4

array1[4] = 5; //This assigns the value of 5 to index 4 of array 1.

Re: flowcode v2 array

Posted: Fri Apr 04, 2008 2:32 pm
by Steve
In flowcode, you can create an array of bytes by creating a variable called something like "MyVar[16]" - this will create an array with 16 members (MyArr[0], MyArr[1], ... MyArr[15]).

You can interact with these Flowcode variables in C code by refering to them as FCV_MYARR[0], etc.