Page 1 of 1

Macro calls

Posted: Thu Apr 17, 2008 6:31 pm
by jadiflow
Hi, I'n new to Flowcode, so please forgive me if I ask the obvious.

I have a Q about macro/subroutine calls. You can specify a parameter and a returned value. Is that particular parameter (variable?) automagically passed when I call the macro? Like it is a global variable?

What happens with the return value; how do I set the return value?

Thanks, Jan Didden

Re: Macro calls

Posted: Thu Apr 17, 2008 8:54 pm
by Steve
A parameter is not like a global variable. You can access global variables in any macro. But you can only access parameters from inside the macro itself. The value you specify as the parameter to the macro call is copied into the parameter variable.

The return variable is set using a calculation icon in the macro. It is usually called something like <MyMacro.Return>.

I've written a quick example that will hopefully explain better. Just load it into Flowcode and set through the code.
MacroParams.fcf
Example using macro parameters and returns
(3 KiB) Downloaded 492 times

Re: Macro calls

Posted: Fri Apr 18, 2008 8:52 pm
by jadiflow
Steve, perfect! Thanks!

Jan Didden