Returning a result from a macro

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
jim_g
Posts: 22
Joined: Tue Jan 13, 2015 12:47 pm
Has thanked: 6 times
Been thanked: 8 times

Returning a result from a macro

Post by jim_g »

Hi
I am trying to write a simple utility macro that receives a character, and returns the resulting ASCII value as a two character string with a leading zero added if necessary.

I know that I shall kick myself when I hear the answer, (I'm still new with Flowcode!) but how do I implement the return value in a Flowcode macro please (the equivalent of the 'return' keyword) I have tried return =, Return = and RETURN = .resultString to no avail. Also when I select a return type, it does not 'stick', i.e., when I set Return type to string, close and re-open the Edit Macro Details dialogue, the return type field is blank. I know that I could use a global variable, I'm trying to make it easier to re-use the code in the future though.

The help topic for setting up a new macro, and its video, seems unhelpful (I'm probably looking in the wrong place) and I also cannot locate a list of reserved words that might give a clue.

Regards

Jim

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times

Re: Returning a result from a macro

Post by LeighM »

Code: Select all

.Return =  .resultString
"re-open the Edit Macro Details dialogue, the return type field is blank"
... now that looks like a bug, thanks

jim_g
Posts: 22
Joined: Tue Jan 13, 2015 12:47 pm
Has thanked: 6 times
Been thanked: 8 times

Re: Returning a result from a macro

Post by jim_g »

Thanks for that. For the future, where (which section) can I find that kind of information (e.g. where in the help files, etc), please?
Jim

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: Returning a result from a macro

Post by Benj »

Hi Jim,

We try to provide all our Flowcode related help here in the wiki: http://www.matrixtsl.com/wiki/index.php?title=Main_Page

Anything you can't find there then please ask and we will do our best to help with an answer.

Post Reply