Re: [NTG-context] Why does this METAPOST vardef 'save' statement fail?

2020-03-14 Thread Gerben Wierda
Answering myself: pth2 is not a valid variable name. Digits are not allowed. > On 14 Mar 2020, at 15:45, Gerben Wierda wrote: > > I have this vardef: > > vardef Foo(expr w, h) = >save pth; path pth; >%save pth2; path pth2; >save pic; picture pic; >pth = fullsquare xysized (w,

[NTG-context] Why does this METAPOST vardef 'save' statement fail?

2020-03-14 Thread Gerben Wierda
I have this vardef: vardef Foo(expr w, h) = save pth; path pth; %save pth2; path pth2; save pic; picture pic; pth = fullsquare xysized (w, h); %pth2 = fullsquare xysized (h/4, h/8) pic := image ( draw pth; %draw pth2 shifted (-w/2, -h/4); % all kind of stuff