[mercury-users] Curly brackets

Thomas Charles CONWAY conway at cs.mu.OZ.AU
Tue Mar 24 09:08:45 AEDT 1998


Peter Phelan, you write:
> Hello again,
> 
> Could somebody please explain the significance of "{ .. }"
> within a predicate definition?
> 

Braces are used in DCG predicates as an escape:

p --> foo, bar.

after the expansion of DCGS becomes:

p(A0, A2) :- foo(A0, A1), bar(A1, A2).

whereas

p --> { foo }, bar.

becomes:

p(A0, A1) :- foo, bar(A0, A1).

See the Mercury reference manual for more information.

Thomas
-- 
ZZ:wq!
^X^C
Thomas Conway               				      conway at cs.mu.oz.au
AD DEUM ET VINUM	  			   Nail here [] for new monitor.



More information about the users mailing list