Page 1 of 1

how to deal with arrays in C code block or any other way

Posted: Tue Dec 23, 2008 2:03 pm
by zenzehar
how to deal with arrays in flowcode??!!...
in conventional c ccode i used to declare an array like:
int x[80];
this one worked and was compiled
but when i tried to access any element in ths array by writing a c code block like --> x[k]=0;
while k is a flow code declared variable (integer) ...
it gives compilation errors ... please help me

i think that there is a way to make c code block interactes with flowcode declared variables .....

Re: how to deal with arrays in C code block or any other way

Posted: Tue Dec 23, 2008 4:00 pm
by Steve
If you have a variable "MyVar" declared within Flowcode, you need to refer to it as "FCV_MYVAR" within any C code you use.

So with your code, if x[80] is adeclared within the C code and "k" is declared within Flowcode, you need to do the following:

x[FCV_K] = 0;