Article View: comp.lang.prolog
Article #173Re: debugging psychologist program.
From: Richard A. O'Keefe
Date: Fri, 10 Apr 1992 09:30
Date: Fri, 10 Apr 1992 09:30
31 lines
1414 bytes
1414 bytes
There is a lot more to say about this, but I'm short of time at the
moment.
In article <2476@loki.une.edu.au>, peter@loki.une.edu.au (Peter Radonyi) writes:
> % 3 response to a swearword.
> respondTo(Yourmessage) :-
> means([Word], profanity), % ****
> member([Word], Yourmessage), % ****
> write('Please do not use words like'), write(Word),
> write('.'),
> nl.
> respondTo(Yourmessage) :-
> means(Word, Meaning),
> member(Word, Yourmessage),
> respond(Word, Meaning, Response),
> printphrase(Response), nl,
> asserta(memorised(Yourmessage)).
Do you see a difference between these? Try
respondTo(Yourmessage) :-
means(Word, profanity),
member(Word, Yourmessage),
write('Please do not use words like '),
write(Word), write(.), nl.
--
I am writing a book on debugging aimed at 1st & 2nd year CS students using
C/Modula/Pascal-like languages. Please send suggestions (other than "you
_must_ cite "C Traps and Pitfalls") to ok@goanna.cs.rmit.oz.au
Technical Details
Message-ID:
<10192@goanna.cs.rmit.oz.au>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!goanna!okReferences:
<2476@loki.une.edu.au>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.prolog Subject: Re: debugging psychologist program. Keywords: prolog Message-ID: <10192@goanna.cs.rmit.oz.au> Date: 10 Apr 92 09:30:08 GMT References: <2476@loki.une.edu.au> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 31