26 Apr
2024
26 Apr
'24
10:32 a.m.
On Fri, 26 Apr 2024, Taco Hoekwater wrote:
On 25 Apr 2024, at 23:12, Fabrice Couvreur
wrote: Hi, Here is the code that interferes with the graph from the last chapter but why ?
Because of this “path b”:
path circle, p, q, b;
which interferes with the assignment line from the other graphic code:
b := xpart(reverse C_f intersectionpoint reverse C_g);
because there “b” is a now a path, not a numeric.
Adding
numeric a,b;
fixes the problem in chapter 14.
Woundn't newnumeric be better? There are very few instances where I want variables defined in one block to be reused in another block. So, I almost always use \startMPcode begingroup; .... endgroup; \stopMPcode to avoid such issues. Aditya