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.

I am sorry that I am not good enough to explain the variables.

Best regards,

Dalyoung

2021. 1. 17. 오후 8:00, ntg-context-request@ntg.nl 작성:

\starttext
\startMPpage

vardef Test (expr ab,cd)=
  %numeric ab;
  %numeric cd;
  draw unitsquare scaled 10 xshifted ab;
  draw unitsquare scaled 10 yshifted cd;
enddef;

Test (50,100);
\stopMPpage
\stoptext