Arrays in flowcode for AVR ver 4
Posted: Fri May 07, 2010 3:39 pm
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???
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???