[metapost] A small problem with "--numbersystem=double"
paul.pichaureau at alcandre.net
Mon Sep 23 10:48:38 CEST 2013
This time it's not a bug, but an apparently strange behavior of metapost.
The following definition is very basic in computer modern sources :
vardef stroke text t =
hide(forsuffixes e = l,r: path_.e:=t; endfor;)
((path_.l) .. (reverse (path_.r)) .. cycle)
The following code simulates a pen stroke between two points:
pair p.l, p.r;
p1.l = (0,0);
p1.r = (10,10);
p2.l = (100,0);
p2.r = (100,100);
draw stroke (p1.e+p2.e) -- (p2.e);
The preceding code works perfectly fine with mpost, but leads to an error
I think the problem came from
(p1.e+p2.e) -- (p2.e);
where "1e.+" is read by metapost as the begining of a number.
It's not a bug, just a point to take in account in future codes.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the metapost