[mercury-users] syntax across languages

Pixel pixel at mandrakesoft.com
Sun Jun 2 19:49:24 AEST 2002


Fergus Henderson <fjh at cs.mu.oz.au> writes:

[...]

> 	(Note: you need to learn the difference between
> 	function declaration and function definition.
> 	Your entry for "C" is a function definition, not
> 	a function declaration. 

ok, description fixed.

[...]

> 	Multiple selection: two different syntaxes.
> 
> 		(2) disjunctions:
> 
> 		( X = positive, ...
> 		; X = negative, ...
> 		; X = zero, ...
> 		)

one thing i try to have for the "switch" entry, is that the val only
appears once (syntactically).

this would be better in if_then_else where i give the n-ary
if_then_else. The problem is I don't know if it would better with a
comment telling the conditions must be separate, or writing explictly
the cut

> 		(1) multiple clauses:
> 
> 		foo(positive) = ...
> 		foo(negative) = ...
> 		foo(zero) = ...

i'd prefer an anonymous solution. is there one?


thanks!
--------------------------------------------------------------------------
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