Thanks Wolfgang, this solved the problem.

%%%% begin example
\startTEXpage[offset=1ts]

\startreusableMPgraphic{Frise}{début,fin}

   numeric debut ; debut := \MPvar{début}  ;
   numeric fin   ; fin   := \MPvar{fin}    ;

   numeric l     ; l     := abs(debut-fin) ;

   draw fullsquare xyscaled (l,10);

\stopreusableMPgraphic

\reuseMPgraphic{Frise}{début=-900,fin=-800}

\stopTEXpage
%%%% end example

Wolfgang

Two question:

Why did this syntax failed?

\setuppapersize [S3]
\starttext

\setupMPvariables[Frise][début=-900]
\setupMPvariables[Frise][fin=-800]

\startreusableMPgraphic{Frise}
numeric l;
l:=\MPvar{début}-\MPvar{fin};
l:=abs(l);
draw fullsquare xyscaled (l,10);
\stopreusableMPgraphic

\reuseMPgraphic{Frise}

\stoptext

1. I tried to use the syntax described in metafun manual, p. 142.
What did I overlook?

2. (maybe should be another thread) Is it possible to combine \MPvars
   with MPbuffers instead of MPgraphics? How?

Thanks,

Damien
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to