Yesno question

Description

Menu that obtains 'yes' or 'no' answer

Source: PROLOG str. 136 Wydawnictwo PLJ Warszawa 1991 ISBN 83-85190-63-5

Download

Program source code: yesno_question.pl

Listing

getstring([H|T]) :- get0(H), (not(H=10), getstring(T); !).
 
pobr_odp(Znak) :- write(Znak), getstring([H|T]), pobr_odp_1(H).
pobr_odp_1(84) :- !.
pobr_odp_1(116) :- !.
pobr_odp_1(78) :- !, fail.
pobr_odp_1(110) :- !, fail.
 
 
 
pobr_odp_1 :- write('[Wprowadz T lub N]: '), getstring([H|T]), pobr_odp_1(H).

Comments

RTERR: *.pl:9:0: Syntax error: Illegal start of term usuniecie ()

pl/prolog/pllib/yesno_question.txt · ostatnio zmienione: 2017/07/17 08:08 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0