[m-users.] Global Variables in Mercury
jfischer at opturion.com
Wed Nov 6 19:39:32 AEDT 2013
On Wed, Nov 6, 2013 at 7:24 PM, John Adams <jpadams78 at gmail.com> wrote:
> Is there a way I can declare mutable global variables in Mercury?
> I don't plan to use C/C++ interface, but (impure) mercury code.
Yes, see the ``Module-local mutable variables'' section of the reference
Alternatively, if you want a mutable location on the heap, then have a look
at the store
module instead. (There's also an undocumented impure variant of that
in the standard library.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users