Loop macro, get information inside

Hi Mps-Team,

i have a situation where i do not find a simple solution.

i have a $LOOP$ macro around a statement $LOOP$[->[localvariable].->[setterMethod()];]
As can be seen, there are two reference macros. The last reference can simply calculated from the single input-model nodes, the loop macro is providing.

but the first reference macro needs information outside the loop... however, the information can not be retrived by using ancestor<>...


how can i set e.g. a string, when calculating the $LOOP$ and pass it to the first reference?

or is there a better solution to this problem?
Dan
3 comments
Hi, Dan.
You can use $VAR$-macro:
Screen shot 2012-12-11 at 3.08.00 PM.png

Then you can use the outside var in queries:
Screen shot 2012-12-11 at 3.08.17 PM.png


Regards,
Mihail
0
The concept is named VarMacro, so you can find its instances in MPS code.
0

Please sign in to leave a comment.