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 .....
how to deal with arrays in C code block or any other way
- Steve
- Matrix Staff
- Posts: 3433
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
Re: how to deal with arrays in C code block or any other way
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;
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;