I created a newLISP IRC channel @ irc.freenode.net. More information about freenode can be found here:
Please feel free to stop by to talk newLISP!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
(print "yes or no")
(set 'answer (read-line))
# WAS THE ANSWER YES OR NO?
(if (= answer "yes")
(print "yes "))
(if (= answer "no")
(print "no"))
Cormullion was showing you how to change the newLISP command line behavior, but perhaps this explains what you really want to do:Quote from: "Lutz"http://www.newlisp.org/newlisp_manual.html#read-line">http://www.newlisp.org/newlisp_manual.html#read-line
(define (main)
(print "What can I assist you with? ")
(set 'answer (read-line)))
)
(define (main)
(print "What can I assist you with? ")
code that will place (cursor) after the question
)
You will also want to cast them to integers or floats using (int foo) or (float foo).Quote from: "Jeff"
(print "What shape: ")
(set 'answer (read-line))
(if
(answer "draw-circle")
(circle))