Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!europa.eng.gtefsd.com!emory!swrinde!sgiblab!sisters.cs.uoregon.edu!cs.uoregon.edu!usenet.ee.pdx.edu!fastrac.llnl.gov!lll-winken.llnl.gov!enews.sgi.com!decwrl!netcomsv!ix.netcom.com!netcom.com!ludemann
From: ludemann@netcom.com (Peter Ludemann)
Subject: Re: consulting a file - suppressing warning msgs
Message-ID: <ludemannCwzCxA.B6w@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <36hh7f$pp@lightning.ditc.npl.co.uk>
Date: Sat, 1 Oct 1994 06:05:34 GMT
Lines: 18

In article <36hh7f$pp@lightning.ditc.npl.co.uk>,
Roger Scowen <rss@seg.npl.co.uk> wrote:
>I advise rewriting the code so that Quintus (and SWI) generate 
>no warnings. If you do so, then finding a misprint often becomes 
>much easier. For example, write
>   foo(X, _) :- dog(X, a).
>rather than
>   foo(X, Y) :- dog(X, a).
>and you will avoid a warning for the singleton variable Y. Make similar

You can also write this as:
    foo(X, _Y) :- dog(X, a).
and still avoid warnings.  The advantage of doing this is that "Y"
might have some mnemonic value for you, whereas "_" requires that any
explanation be in comments (you do comment your code, don't you?.

-- 
Peter Ludemann                      ludemann@netcom.com
