On Fri, 26 Apr 2024, Taco Hoekwater wrote:

> 
> 
> > On 25 Apr 2024, at 23:12, Fabrice Couvreur <fabrice1.couvr...@gmail.com> 
> > 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
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to