![0 0 upvotes](/icons/vote_up.gif)
![0 0 downvotes](/icons/vote_down.gif)
See also
Example
Can be used to ask the user as a proper replacement for read/1
ask_user :- format("You must answer 'yes' to accept this offer one cannot refuse!~n"), read_line_to_string(user_input,S1), string_lower(S1,S2), ( member(S2,["yes","1","ok","y","ja","oui"]) -> format("You may proceed, good citizen.~n") ; format("I am sorry to hear that.~n"), fail ).
Then:
?- ask_user. You must answer 'yes' to accept this offer one cannot refuse! |: yes You may proceed, good citizen. true.