<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">And suddenly it all becomes clear!<div>Problem solved.</div><div><br></div><div>I think I might change the nano syntax colouring so dots are red! I have though learned something from Julien, I probabl read it once but it long since fizzled away from working memory, regarding field updates.<div><br></div><div>In another post, Julien stated that </div><div><br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div></div></blockquote><blockquote type="cite"><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div> 63 !:S = !.S ^nl_written := yes.</div></blockquote><br>That last line can be more concisely written as:<br><br><div> !S ^ nl_writtern := yes</div></blockquote><div><br></div><div><br></div><div>but the only example of field updating I remember seeing in the manual was this one whic has been my guide ever since, (https://www.mercurylang.org/information/doc-release/mercury_ref/Field-access-examples.html#Field-access-examples)</div><div><br></div><div><div>:- func type1 ^ increment_field3 = type1.</div><div>Term0 ^ increment_field3 =</div><div> Term0 ^ field1 ^ field3 := Term0 ^ field1 ^ field3 + 1.</div></div><div><br></div><div>but then, going to 11 on RTFM, I found the relevant information on this page:</div><div><div style="display: block;"><div style="-webkit-user-select: all; -webkit-user-drag: element; display: inline-block;" class="apple-rich-link" draggable="true" role="link" data-url="https://www.mercurylang.org/information/doc-latest/mercury_ref/Clauses.html#State-variables"><a style="border-radius:10px;font-family:-apple-system, Helvetica, Arial, sans-serif;display:block;-webkit-user-select:none;width:300px;user-select:none;-webkit-user-modify:read-only;user-modify:read-only;overflow:hidden;text-decoration:none;" class="lp-rich-link" rel="nofollow" href="https://www.mercurylang.org/information/doc-latest/mercury_ref/Clauses.html#State-variables" dir="ltr" role="button" draggable="false" width="300"><table style="table-layout:fixed;border-collapse:collapse;width:300px;background-color:#E5E6E9;font-family:-apple-system, Helvetica, Arial, sans-serif;" class="lp-rich-link-emailBaseTable" cellpadding="0" cellspacing="0" border="0" width="300"><tbody><tr><td vertical-align="center"><table bgcolor="#E5E6E9" cellpadding="0" cellspacing="0" width="300" style="font-family:-apple-system, Helvetica, Arial, sans-serif;table-layout:fixed;background-color:rgba(229, 230, 233, 1);" class="lp-rich-link-captionBar"><tbody><tr><td style="padding:8px 0px 8px 0px;" class="lp-rich-link-captionBar-textStackItem"><div style="max-width:100%;margin:0px 16px 0px 16px;overflow:hidden;" class="lp-rich-link-captionBar-textStack"><div style="word-wrap:break-word;font-weight:500;font-size:12px;overflow:hidden;text-overflow:ellipsis;text-align:left;" class="lp-rich-link-captionBar-textStack-topCaption-leading"><a rel="nofollow" href="https://www.mercurylang.org/information/doc-latest/mercury_ref/Clauses.html#State-variables" style="text-decoration: none" draggable="false"><font color="#272727" style="color: rgba(0, 0, 0, 0.847059);">The Mercury Language Reference Manual: Clauses</font></a></div><div style="word-wrap:break-word;font-weight:400;font-size:11px;overflow:hidden;text-overflow:ellipsis;text-align:left;" class="lp-rich-link-captionBar-textStack-bottomCaption-leading"><a rel="nofollow" href="https://www.mercurylang.org/information/doc-latest/mercury_ref/Clauses.html#State-variables" style="text-decoration: none" draggable="false"><font color="#808080" style="color: rgba(0, 0, 0, 0.498039);">mercurylang.org</font></a></div></div></td><td style="padding:6px 12px 6px 0px;" class="lp-rich-link-captionBar-rightIconItem" width="36"><a rel="nofollow" href="https://www.mercurylang.org/information/doc-latest/mercury_ref/Clauses.html#State-variables" draggable="false"><img style="pointer-events:none !important;display:inline-block;width:36px;height:36px;border-radius:3px;" width="36" height="36" draggable="false" class="lp-rich-link-captionBar-rightIcon" alt="favicon.ico" src="cid:BD3FE0CE-A7D0-4DF5-9ABD-39649DBFED08"></a></td></tr></tbody></table></td></tr></tbody></table></a></div></div><br></div><div><br></div><div></div><div>under the section 'State variable field updates'.</div><div><br></div><div>Excellent.</div><div><br></div><div>I knew it was my fault.</div><div><br></div><div>I don't like tattoos but I may well get to the point of having RTFM placed somewhere, someday.</div><div><br></div><div>Thanks Zoltan and Julien.</div><div><br></div><div>Onwards.........</div><div><br></div><div>Sean.</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><div><br><blockquote type="cite"><div>On 4 Dec 2022, at 12:06, Zoltan Somogyi <zoltan.somogyi@runbox.com> wrote:</div><br class="Apple-interchange-newline"><div><div><br><br>On Sun, 4 Dec 2022 12:02:58 +0000, "Sean Charles (emacstheviking)" <objitsu@gmail.com> wrote:<br><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> 65 write_(!S, brace_o, !IO) :-<br> 66 write_(!S, s("{"), !IO),<br> 67 !:S = !.S ^tab_size := !.S ^tab_size+1.<br></blockquote> ^^^<br><blockquote type="cite"> 68 write_(!S, nl, !IO).<br></blockquote><br>Presuambly, the period marked above is actually supposed to be a comma.<br>(Because it's a period, you have two clauses that match nl.)<br></blockquote><br>Why would it be a comma? I just don't understand, "!,S" ??? That's a syntax error surely?<br></blockquote><br>The email system mangles indentation. Julien was not pointing<br>to the period in !.S, but to the period at the END of the line.<br><br>Zoltan.<br><br><br></div></div></blockquote></div><br></div></div></body></html>