[mercury-users] Named constants?
Julien Fischer
juliensf at cs.mu.OZ.AU
Thu May 13 13:24:23 AEST 2004
On Thu, 13 May 2004, Peter Hawkins wrote:
> Hi...
>
> How does one create some sort of named constant in Mercury? (as one might do
> with a #define in C).
>
> Should I just do this?
> :- func my_constant = int.
> my_constant = 42.
>
That's the usual way.
> Surely there is a more compact notation...
>
You can't get much more compact than the above (in Mercury at least).
Cheers,
Julien.
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list