[NTG-context] Problem with show command in MetaFun

Hans Hagen j.hagen at xs4all.nl
Thu Jan 7 16:35:07 CET 2021


On 1/7/2021 4:11 PM, Keith McKay wrote:
> In the MWE below I would expect the "show" command to print the value of 
> p in the console output (I use Texworks), however this does not seem to 
> be happening. I haven't used "show" in MetaFun for a while, am I 
> implementing it correctly?
> 
> Best Wishes
> 
> Keith McKay
> 
> %%%%%%%% MWE %%%%%%%%%
> 
> \setuppapersize[A4, portrait]
> 
> \starttext
> 
> \startMPpage
> 
> StartPage;
> 
> width := PaperWidth ; height := PaperHeight ; unit := cm ;
> 
> numeric p;
> 
> p := 0;
> 
> for q = 0 step 1 until 10:
> 
> show p;
> 
> p := p + 1;
> 
> fill fullcircle xyscaled(3cm,4cm) shifted ((p +2)*cm, (p + 2)*cm) 
> withcolor red ;
> 
> endfor;
> 
> StopPage;
> 
> \stopMPpage
> 
> \stoptext

\enabletrackers[metapost.tracingall]


but best use:

message(p);

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


More information about the ntg-context mailing list