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...
flowcode v2 array
- 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: flowcode v2 array
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Steve
- Matrix Staff
- Posts: 3433
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: flowcode v2 array
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.
You can interact with these Flowcode variables in C code by refering to them as FCV_MYARR[0], etc.