newLISP Fan Club

Forum => newLISP newS => Topic started by: scottmaccal on June 04, 2009, 05:37:55 AM

Title: Correct Input
Post by: scottmaccal on June 04, 2009, 05:37:55 AM
Hi all,



I'm trying to verify correct input. I want to make sure that the user either inputs yes or no before the program continues. How would this best be accomplished? So far I this code fragment:


(print "yes or no")

(set 'answer (read-line))

# WAS THE ANSWER YES OR NO?

(if (= answer "yes")
  (print "yes "))

(if (= answer "no")
  (print "no"))
Title: Never mind
Post by: scottmaccal on June 04, 2009, 06:40:56 AM
Hi all,



Never mind. Solution found. I must have taken stupid pills this morning.