Macro return value

Any general or miscellaneous queries that do not fit into the other forum catagories

Moderators: Benj, Mods

Post Reply
Kumaran
Posts: 73
Joined: Tue Apr 08, 2008 5:23 pm
Been thanked: 1 time
Contact:

Macro return value

Post by Kumaran »

I have createded a macro in my program. I wanted a byte value to return. How to do? IN macro properties I have selected Byte as return type. Which value it will return? How to define it?

Thanks in advance
Kumaran

User avatar
Steve
Matrix Staff
Posts: 3424
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Macro return value

Post by Steve »

Add a calculation icon within the macro itself. When you browse the available variables (using the "variables.." button on the edit calculation icon), you will see a variable called something like "myMacro.Return" - this will hold the value that is returned by the macro.

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

Re: Macro return value

Post by saschech@gmx.de »

Halle Steve
What is the difference between a variables build by me self and the *.Return variables?

Regards wolfgang

Kumaran
Posts: 73
Joined: Tue Apr 08, 2008 5:23 pm
Been thanked: 1 time
Contact:

Re: Macro return value

Post by Kumaran »

Hello

Thank you

Regards
Kumaran

User avatar
Steve
Matrix Staff
Posts: 3424
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Macro return value

Post by Steve »

Hello Wolfgang,

The "*.return" variable is just a special variable that holds the value to return from the macro (if you have selected it to have a return value in the macro properties). It works like any other variable, but is 'local' to the macro in the same way that "parameters" and "local variables" are.

Post Reply