<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div style="font-family: Verdana;font-size: 12.0px;">
<div>Thank you for your response.  It sounds like something that might not be easy to fix.  Perhaps it would be a good idea to revise the manual so that it notes the limitations of the "boxes" macros.</div>

<div> </div>

<div>Some months ago I had a different problem:  I tried to use one or more objects returned by boxit in a loop, but it didn't work and I got another cryptic error message.  I assigned the values I needed to another variable and the loop worked.  I must have this code somewhere but I don't remember off-hand where it could be.  I'll try to find it.</div>

<div> </div>

<div>Incidentally, I noticed something else in the manual (mpman):  Page 43:  "There is also<br/>
an unfilldraw statement just in case someone finds a use for it."  Actually, this command is useful, if for instance, one draws a cyclical path with a particular pen and then wants to unfill it later, or conditionally, or on a different picture, or whatever.  This isn't even an obscure usage.
<div> 
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Gesendet:</b> Montag, 28. Februar 2022 um 17:45 Uhr<br/>
<b>Von:</b> "Daniel H. Luecking" <luecking@uark.edu><br/>
<b>An:</b> "Laurence Finston" <Laurence.Finston@gmx.de>, "metapost@tug.org" <metapost@tug.org><br/>
<b>Betreff:</b> Re: [metapost] Possible bug with boxit</div>

<div>
<div>
<div style="font-family: "Courier New" , monospace;font-size: 12.0pt;color: rgb(0,0,0);"> </div>

<div style="font-family: "Courier New" , monospace;font-size: 12.0pt;color: rgb(0,0,0);">The file boxes.mp adds the command</div>

<div style="font-family: "Courier New" , monospace;font-size: 12.0pt;color: rgb(0,0,0);">    save pic_;</div>

<div style="font-family: "Courier New" , monospace;font-size: 12.0pt;color: rgb(0,0,0);">to extra_beginfig. This seems likely to be the problem: drawunboxed ultimately makes use of pic_.</div>

<div style="font-family: "Courier New" , monospace;font-size: 12.0pt;color: rgb(0,0,0);"> </div>

<div style="font-family: "Courier New" , monospace;font-size: 12.0pt;color: rgb(0,0,0);">Also, extra_endfig has clearboxes added, which may also cause problems (although I don't really understand all that it does).</div>

<div style="font-family: "Courier New" , monospace;font-size: 12.0pt;color: rgb(0,0,0);"> </div>

<div style="font-family: "Courier New" , monospace;font-size: 12.0pt;color: rgb(0,0,0);">Cheers,</div>

<div>
<div style="font-family: "Courier New" , monospace;font-size: 12.0pt;color: rgb(0,0,0);"> </div>

<div id="Signature">
<div>
<div style="font-family: Calibri , Arial , Helvetica , sans-serif;margin: 0;">
<div style="font-family: Tahoma;font-size: 13.0px;">
<div style="font-family: Tahoma;font-size: 13.0px;">
<div style="font-family: Tahoma;font-size: 13.0px;">
<div style="font-family: Tahoma;font-size: 13.0px;">
<div style="font-family: Tahoma;font-size: 13.0px;">
<div style="font-family: Tahoma;font-size: 13.0px;"><font face="Courier New" size="3">Daniel H. Luecking [luecking@uark.edu]<br/>
Department of Mathematical Sciences<br/>
1 University of Arkansas<br/>
Fayetteville, AR, USA 72701-1201</font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

<div id="appendonsend"> </div>

<hr style="display: inline-block;width: 98.0%;"/>
<div id="divRplyFwdMsg"><font color="#000000" face="Calibri, sans-serif" style="font-size: 11.0pt;"><b>From:</b> metapost <metapost-bounces+luecking=uark.edu@tug.org> on behalf of Laurence Finston <Laurence.Finston@gmx.de><br/>
<b>Sent:</b> Tuesday, February 22, 2022 4:41 PM<br/>
<b>To:</b> Metapost List <metapost@tug.org><br/>
<b>Subject:</b> [metapost] Possible bug with boxit</font>

<div> </div>
</div>

<div class="BodyFragment">
<div class="PlainText"><font size="2"><span style="font-size: 11.0pt;">In the attached MP file, I use macros from boxes.mp.  It doesn't fail to call boxit outside of a figure, but it doesn't produce the expected result (at least, the one I expected):  If I call it outside of a figure but not within the figure, I get this error when I call drawunboxed:<br/>
<br/>
>> sproc_.C<br/>
! Not a string.<br/>
<to be read again><br/>
                   (<br/>
<for(C)> scantokens.sproc_(SUFFIX0)(<br/>
                                    (SUFFIX0)); ENDFOR<br/>
fixsize->...$=(TEXT2):scantokens.sproc_$($);endfor<br/>
                                                  .endgroup<br/>
drawunboxed->fixsize((TEXT0))<br/>
                             ;fixpos((TEXT0));forsuffixes.s=(TEXT0):draw.pic...<br/>
l.290   drawunboxed(C)<br/>
                      ;<br/>
?<br/>
<br/>
If I call it outside the figure and then inside it, I get this error:<br/>
<br/>
! Redundant equation.<br/>
<to be read again><br/>
                   ;<br/>
boxit->...FIX2)sw)=ypart((SUFFIX2)se-(SUFFIX2)sw);<br/>
                                                  0=xpart((SUFFIX2)ne-(SUFFI...<br/>
l.273   boxit.C(V67)<br/>
                    ;  %% boxit must be called here in order for drawunboxed...<br/>
<br/>
?<br/>
<br/>
If I call it in figure 0 and don't call it in the following figure (100), I get the following error when I call bpath in fig. 100:<br/>
<br/>
>> sproc_.C<br/>
! Not a string.<br/>
<to be read again><br/>
                   (<br/>
<for(C)> scantokens.sproc_(SUFFIX0)(<br/>
                                    (SUFFIX0)); ENDFOR<br/>
fixsize->...$=(TEXT2):scantokens.sproc_$($);endfor<br/>
                                                  .endgroup<br/>
bpath->begingroup.fixsize((SUFFIX2))<br/>
                                    ;fixpos((SUFFIX2));scantokens.pproc_(SUF...<br/>
<to be read again><br/>
                   ;<br/>
l.326   undraw bpath(C);<br/>
<br/>
?<br/>
<br/>
If I call boxit in both figures and not outside them, it works and the following two files are output:<br/>
<br/>
ttemp000.eps .. ttemp100.eps<br/>
<br/>
I didn't find any indication in mpboxes.pdf that the variables created by boxit would be local to an enclosing figure and I wouldn't have expected this behavior.<br/>
<br/>
Is this a bug?<br/>
<br/>
Thanks,<br/>
<br/>
Laurence</span></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div></body></html>