Article View: comp.lang.prolog
Article #658Re: SICStus Prolog singleton warnings slow down while consulting a file
From: Paul Singleton
Date: Wed, 19 Aug 1992 11:32
Date: Wed, 19 Aug 1992 11:32
25 lines
1467 bytes
1467 bytes
From article <1992Aug17.210426.14213@cs.sfu.ca>, by gregory@cs.sfu.ca (Gregory Sidebottom):
> Try starting your singlton variables with the underscore symbol. This
> tells the compiler that you know it's a singlton variable, even though
> you want to give it a meaningful name. So you can write:
>
> p(_SomethingMeaningful).
>
> and not get a warning in Sicstus. But note that variables beginning
> with an underscore are not anonymous--the two variable symbols in:
>
> p(_X) :- q(_X).
>
> denote the same variable.
In which case the compiler ought to give a warning "Multiple occurences of
a variable for which the singleton variable check has been suppressed'.
I suggest that such variables are known as "Singleton" variables as opposed
to "singleton" variables ...
----
__ __ Paul Singleton (Mr) JANET: paul@uk.ac.keele.cs
|__) (__ Computer Science Dept. other: paul@cs.keele.ac.uk
| . __). Keele University, Newcastle, tel: +44 (0)782 621111 x7355
Staffs ST5 5BG, ENGLAND fax: +44 (0)782 713082
Technical Details
Message-ID:
<3840@keele.keele.ac.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!keele!csa09References:
<1992Aug17.210426.14213@cs.sfu.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!keele!csa09 From: csa09@seq1.keele.ac.uk (Paul Singleton) Newsgroups: comp.lang.prolog Subject: Re: SICStus Prolog singleton warnings slow down while consulting a file Message-ID: <3840@keele.keele.ac.uk> Date: 19 Aug 92 11:32:21 GMT References: <1992Aug17.210426.14213@cs.sfu.ca> Organization: University of Keele, England Lines: 25