[dev-context] MkIV "isolated expression" with \(start|stop|use)staticMPfigure

Hans Hagen pragma at wxs.nl
Sun Apr 14 15:50:09 CEST 2013


On 4/14/2013 2:36 PM, Sanjoy Mahajan wrote:
>>>     65     def r_ladder := draw unitsquare; enddef;
>>
>> wrong mp: no := but =
>
> Oh, you're right.  Though why does it work most of the time, but fails
> depending on the exact surrounding .tex text (outside of the MP code)?
>
> Maybe related: mpost never noticed my syntax error before.  That
> function defn has used the := syntax for about 3 years (the vcs tells
> me that I put in that function in March, 2010).
>
> With my mpost today, it also works.  Here's a minimal .mp file that
> worked (using MetaPost version 1.504):
>
> def r_ladder :=
>    draw unitsquare scaled 1cm
> enddef;
>
> beginfig(1)
>    r_ladder;
> endfig;
> end

hm, interesting, i wonder what the difference is in = and := in such a def

Hans

-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the dev-context mailing list