Re: Simply Expert System for Visual Prolog




Hi,

the problem is, I cannot make my visual prolog to read any chars from the keybord (it reads but I can't work with that)

example in PIE:

dupa():- write("Yes or No ? "),
repeat,
	readchar(Char),
	(	
		member(Char,[`y,`Y]), Answer = yes ;
		member(Char,[`n,`N]), Answer = no
	),
write(Answer),nl.


it doesn't work - if I press Y or y / N or n - I become no results - I should get "YES" or "NO".


Why?

thx

-----------
y
Trace: >> RETURN: readchar(y)
Trace: >> CALL:   member(y,[y,Y])
Trace: >> FAIL:   member(y,[y,Y])
Trace: >> CALL:   member(y,[n,N])
Trace: >> FAIL:   member(y,[n,N])
Trace: >> REDO:   readchar(y)
Trace: >> FAIL:   readchar(_)
Trace: >> CALL:   readchar(_)

-------------

Duncan Patton wrote:
I don't have any Turbo Prolog code around any more, but that's what you need to
look for. There's a whole bunch of examples came with the releases and these should work under VP with minor modification.


Dhu

On Sun, 26 Jun 2005 18:24:50 +0200
metah <bisgmbh@xxxxxxxxxxx> wrote:


Hi,

does anybody know, where could I download a simple expert system for Visual Prolog? Some Rules, Some Questions and then one Solution - thats it.

I have downloaded some systems, but they don't work under visual prolog.

Thanks

metah

metah@xxxxxxxxxxxxxxxxx



.



Relevant Pages

  • Re: shed rather term instantly than comfort with Talals whole casualty
    ... Everyone cast once, repeat less, then undertake up to the trace ... after the port. ...
    (sci.crypt)
  • Re: Need advice from Apro Users
    ... the trace file seems odd - it is showing chars that I'm pretty ... Can't say I have but then I don't use the Apro trace or log much. ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Entry problem
    ... >>That ought to limit the text length to 50 chars. ... Monitor the entry data in the trace, ...
    (comp.lang.tcl)
  • Fax Console
    ... I posted this message many moons ago but for some reason cannot trace it. ... Sorry if it comes over as a repeat. ... I am running Vista Home Premium SP1. ...
    (microsoft.public.windows.vista.general)
  • Route related panic.
    ... db> trace ... How to repeat: ... I can reproduce this panic by removing all routes and adding for example: ...
    (freebsd-current)