<div dir="ltr">Hi,<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 6, 2013 at 7:24 PM, John Adams <span dir="ltr"><<a href="mailto:jpadams78@gmail.com" target="_blank">jpadams78@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div>Is there a way I can declare mutable global variables in Mercury?<br>
</div>I don't plan to use C/C++ interface, but (impure) mercury code.<br></div></div></blockquote><div><br></div><div>Yes, see the ``Module-local mutable variables'' section of the reference manual.</div><div>
<br></div><div>Alternatively, if you want a mutable location on the heap, then have a look at the store</div><div>module instead. (There's also an undocumented impure variant of that called mutvar</div><div>in the standard library.)</div>
<div> </div><div>Cheers,</div><div>Julien.</div></div></div></div>