Różnice
Różnice między wybraną wersją a wersją aktualną.
|
|
— |
pl:prolog:pllib:yesno_question [2019/06/27 15:50] (aktualna) |
| ====== 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 () |