What's going wrong. I try to use 2-dimensional arrays in flowcode with C-blocks . I think that the syntax is right.
In C-block I wrote:
"
unsigned char FCV_LABY [7][10]={
{0x01,0x02,0x0B,0x09,0x03,0x0A,0x09,0x03,0x0B,0x08},
{0x06,0x09,0x05,0x06,0x0D,0x03,0x0C,0x05,0x06,0x09},
{0x01,0x05,0x06,0x09,0x04,0x06,0x09,0x06,0x09,0x05},
{0x05,0x06,0x09,0x06,0x09,0x01,0x09,0x06,0x09,0x05},
{0x05,0x06,0x09,0x06,0x09,0x01,0x06,0x09,0x05,0x05},
{0x07,0x0E,0x0B,0x0B,0x0C,0x05,0x03,0x0A,0x0C,0x05},
{0x04,0x02,0x0C,0x04,0x02,0x0E,0x0E,0x0A,0x08,0x0F}
};
"
and later I'll try to read this array in C-block
"
FCV_APU1=FCV_LABY[FCV_RIVI,FCV_SARAKE];
"
apu1, rivi and sarake are global variables..
but it doesn't work ....
What's wrong???
Arrays in flowcode for AVR ver 4
Moderator: Benj
-
Sean
- Valued Contributor

- Posts: 548
- Joined: Tue Jun 26, 2007 11:23 am
- Has thanked: 6 times
- Been thanked: 44 times
Re: Arrays in flowcode for AVR ver 4
Hello,
The array initialization syntax is correct.
The command to read back an array element has the two index values in a single set of brackets separated by a comma. These values should be in separate square brackets:
FCV_APU1=FCV_LABY[FCV_RIVI][FCV_SARAKE];
The array initialization syntax is correct.
The command to read back an array element has the two index values in a single set of brackets separated by a comma. These values should be in separate square brackets:
FCV_APU1=FCV_LABY[FCV_RIVI][FCV_SARAKE];
Re: Arrays in flowcode for AVR ver 4
It seems to work, I have to correct my errors. Thank You very much...........