[m-rev.] For review: test case for memoed predicates with no outputs

Zoltan Somogyi zs at csse.unimelb.edu.au
Mon Oct 16 14:23:17 AEST 2006


On 16-Oct-2006, Ralph Becket <rafe at csse.unimelb.edu.au> wrote:
> +main(!IO) :-
> +    ( if 
> +        p(1, 1),
> +        p(2, 2),
> +        p(3, 3)
> +      then
> +        io.write_string("aye\n", !IO)
> +      else
> +        io.write_string("nay\n", !IO)
> +    ).

That only tests for success. You also need a nested if-then-else to test for
failure.

Zoltan.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list