Global variables in flowcode 4 C code blocks
Posted: Wed Jun 02, 2010 3:29 pm
Hello,
Apologies, posted here as no ability to post in FC4 forum.
I know that C code block can be used to write custom code and declare variables. However it is not clear if the variable would be global or local to the macro within which the C code block is inserted.
Basically I just wanted to initialise an array, which I recall (I think) in C you can only do at variable definition time. i.e. after declaration of a variable "int ArrayVar[10]" then you cannot type in "ArrayVar[] = {1,2,3,4,5,6,7,8,9,10};"
This then comes back to if an array defined and initialised in a C code block within flowcode v4 would be local or global.
(of course I could individually initialise each element using a calculation block ... )
Thanks,
Mark
Apologies, posted here as no ability to post in FC4 forum.
I know that C code block can be used to write custom code and declare variables. However it is not clear if the variable would be global or local to the macro within which the C code block is inserted.
Basically I just wanted to initialise an array, which I recall (I think) in C you can only do at variable definition time. i.e. after declaration of a variable "int ArrayVar[10]" then you cannot type in "ArrayVar[] = {1,2,3,4,5,6,7,8,9,10};"
This then comes back to if an array defined and initialised in a C code block within flowcode v4 would be local or global.
(of course I could individually initialise each element using a calculation block ... )
Thanks,
Mark