Różnice

Różnice między wybraną wersją a wersją aktualną.

Odnośnik do tego porównania

pl:prolog:pllib:yesno_question [2019/06/27 15:50] (aktualna)
Linia 1: Linia 1:
 +====== Yesno question ======
 +{{tag>​interactive}}
 +===== 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 =====
 +<code prolog>
 +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).
 +</​code>​
 +
 +===== Comments =====
 +RTERR: *.pl:9:0: Syntax error: Illegal start of term usuniecie ()
pl/prolog/pllib/yesno_question.txt · ostatnio zmienione: 2019/06/27 15:50 (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