> On 17 Jan 2021, at 11:17, Damien Thiriet wrote:
>
> Hi,
>
>
> I have some troubles with understanding metafun's macro mechanism.
>
> Given this MWE:
>
> \starttext
> \startMPpage
>
> vardef Test (expr ab,cd)=
> %numeric ab;
> %numeric cd;
> draw unitsquare scaled 10 xshifted ab;
>
Dear Damien Thiriet,
If you change ‘vardef’ to ‘def’, you will get the figure.
There is a difference between ‘vardef’ and ‘def’.
AFAIK, vardef returns the value of the last statement in the macro.
Please see the examples in Metafun manual from page 32 ~ .
I hope that you find your answer there.