[mercury-users] very minor variable printing bug
Nicholas Nethercote
njn at csse.unimelb.edu.au
Fri Oct 26 13:23:39 AEST 2007
Hi,
It's not a big deal, but I thought I'd mention it: if you have a variable
whose name begins with "V_" in a Mercury program, it seems that any
error message that mentions it prepends it with an additional "V_".
Eg. in this type-incorrect line from a program I wrote:
VArray = [0-V_2, 1-V_1, 2-V_0],
I get an error message:
p.m:035: In clause for predicate `problem'/1:
p.m:035: in list element #0:
p.m:035: in unification of argument
p.m:035: and term `(V_42 - V_V_2)':
p.m:035: type error in argument(s) of functor `-/2'.
p.m:035: Argument 2 (V_V_2) has type `(fd.fdvar)',
p.m:035: expected type was `((fd.expression).var_expression)'.
If I change V_2 to, say, Z_2, it's printed correctly as "Z_2".
Maybe it's intended behaviour, but it took me a minute to work out what was
happening when I first saw it.
Nick
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to: mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions: mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the users
mailing list