Article View: comp.lang.prolog
Article #2580A bug
From: jim
Date: Fri, 13 Feb 1987 13:07
Date: Fri, 13 Feb 1987 13:07
26 lines
1485 bytes
1485 bytes
A bug: '1.2' is not an integer in our prolog, so X is '1.2' + '3.4'
gives an error message. Doing
?- name('1.2',Ascii),name(Integer,Ascii), integer(Integer).
also fails. So, how do I take the single brackets off?
Another thing, why does 'name' on the empty list of ascii characters give an
atom with no name rather than a fail. On our cprolog
?-name(X,[])
gives X= '' like so (including the space in front) and creating a Y thus
?-name(X,[]),Y =[X|[]]
gives Y=[ '']
which at least is unrecognisable, while a development prolog I've used gives
Y=[] since no quote marks go around the invisible atom. note that Y will not
unify with the empty list (boy was that a bug to find!)
ta, jim
--
Jim Scobbie: Centre for Cognitive Science, Edinburgh University,
2 Buccleuch Place, Edinburgh, EH8 9LW, SCOTLAND
UUCP: ...!ukc!cstvax!epistemi!jim
JANET: jim@uk.ac.ed.epistemi
Technical Details
Message-ID:
<1739@epistemi.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!brl-adm!seismo!mcvax!ukc!its63b!epistemi!jimShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!brl-adm!seismo!mcvax!ukc!its63b!epistemi!jim From: jim@epistemi.UUCP Newsgroups: comp.lang.prolog Subject: A bug Message-ID: <1739@epistemi.UUCP> Date: Fri, 13-Feb-87 08:07:04 EST Article-I.D.: epistemi.1739 Posted: Fri Feb 13 08:07:04 1987 Date-Received: Sun, 15-Feb-87 05:31:32 EST Reply-To: jim@epistemi.UUCP (Jim Scobbie) Distribution: comp.lang.prolog Organization: Epistemics, Edinburgh U., Scotland Lines: 26