[metapost] A small problem with "--numbersystem=double"
Paul Pichaureau
paul.pichaureau at alcandre.net
Mon Sep 23 10:48:38 CEST 2013
Hi!
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)
enddef;
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);
beginfig(1);
draw stroke (p1.e+p2.e) -- (p2.e);
endfig;
end.
The preceding code works perfectly fine with mpost, but leads to an error
with
mpost --numbersystem=double
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.
Cheers
--
Paul Pichaureau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/metapost/attachments/20130923/fe93dc20/attachment.html>
More information about the metapost
mailing list