Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!nntp.club.cc.cmu.edu!godot.cc.duq.edu!news.duke.edu!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!spool.mu.edu!sgiblab!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!pets
From: pets@munta.cs.mu.OZ.AU (Peter Schachte)
Subject: Re: consulting a file - suppressing warning msgs
Message-ID: <9427618.22658@mulga.cs.mu.OZ.AU>
Sender: news@cs.mu.OZ.AU
Organization: Computer Science, University of Melbourne, Australia
References: <36hh7f$pp@lightning.ditc.npl.co.uk>
Date: Mon, 3 Oct 1994 08:20:37 GMT
Lines: 38

In <36hh7f$pp@lightning.ditc.npl.co.uk> rss@seg.npl.co.uk (Roger Scowen) writes:
>Similarly write
>
>   foo(1).
>   foo(2).
>   foo(1,2).
>   foo(2,3).
>
>instead of
>
>   foo(1).
>   foo(1,2).
>   foo(2).
>   foo(2,3).
>
>and you will avoid a warning that the clauses of foo/1 and foo/2
>are not contiguous.

If for some reason you really want a particular predicate to be
discontiguous, you can use a discontiguous declaration for just the
predicates you want to be discontiguous.  E.g., you can write


   :- discontiguous foo/1.
   :- discontiguous bar/1.
   foo(1).
   bar(1).
   foo(2).
   bar(2).

Discontiguous predicates are usually not desirable, but when they are,
a few discontiguous declarations are better than turining of
contiguity checking altogether.


-- 
-Peter Schachte
pets@cs.mu.OZ.AU
