Różnice

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

Odnośnik do tego porównania

pl:prolog:pllib:interface [2019/06/27 15:50] (aktualna)
Linia 1: Linia 1:
 +====== Interface ======
 +{{tag>​interactive}}
 +===== Description =====
 +The simplest version of ask prompts the user with the requested attribute and value and seeks confirmation or denial of the proposed information.
 +
 +**Source**: ​ Building Expert Systems in PROLOG Publisher
 +===== Download =====
 +Program source code: {{interface.pl}}
 +===== Listing =====
 +<code prolog>
 +ask(Attr, Val):-
 +write(Attr:​Val),​
 +write('?​ '),
 +read(yes).
 +
 +eats(X):- ask(eats, X).
 +
 +feet(X):- ask(feet, X).
 +
 +wings(X):- ask(wings, X).
 +
 +neck(X):- ask(neck, X).
 +
 +color(X):- ask(color, X).
 +</​code>​
 +===== Comments =====
  
pl/prolog/pllib/interface.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