Global variables in flowcode 4 C code blocks

For MIAC users to discuss projects, applications, and any other issues related to the MIAC unit.

Moderators: Benj, Mods

Post Reply
Markro
Posts: 20
Joined: Sun Sep 23, 2007 12:41 am
Contact:

Global variables in flowcode 4 C code blocks

Post by Markro »

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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Global variables in flowcode 4 C code blocks

Post by Benj »

Hi Mark,

You can post in the v4 Forum topic by following the "Online Resources" link located in the Flowcode V4 help menu and enter your forum username into the form provided.

You will require a registered copy of Flowcode 4 to gain access to the forum topic.

Im afraid I cannot answer Flowcode questions outside of the topic areas.

Post Reply