Page 1 of 1

Macro.Return

Posted: Mon Apr 26, 2004 5:50 pm
by Falco72
I am posting this here cause I dont know if this is a bug or not.
I have a sub like this

Code: Select all

Sub Any
/return "abc"
in the main this piece of code

Code: Select all

/echo ${Macro.Return}
give as results "abc", but

Code: Select all

/echo ${Macro.Return.Equal["abc"]}
give FALSE as result.
Insteed if the return do not use "", like

Code: Select all

Sub Any
/return abc
this piece of code

Code: Select all

/echo ${Macro.Return.Equal["abc"]}
results TRUE.

Posted: Mon Apr 26, 2004 6:09 pm
by Lax
Not really a bug, just the way MQ2Data works. When MQ2Data sees quotes at the start of your [], it strips the first set and assumes thats the entire thing (or something, there might be some bugs with quotes actually, but not the one you're asking about).

All in all, you should just avoid using quotes in your return to enclose a value ;)