[metapost] Error when defining a function
Taco Hoekwater
taco at elvenkind.com
Fri Jun 15 08:51:33 CEST 2007
Peng Yu wrote:
> Hi
>
> I couldn't figure out what is wrong with the following metapost
> program. Would you please help me?
The formal macro arguments should be single symbolic tokens, not
sequences (x1 is essentially 'x', followed by '1').
In this case, I would propose you use
def drawrect(expr lx, rx, by, ty) =
draw (lx,by)--(rx,by)--(rx,ty)--(lx,ty)--cycle
enddef;
Best wishes, Taco
More information about the metapost
mailing list