RosettaCodeData/Task/User-input-Text/Common-Lisp/user-input-text.lisp

10 lines
245 B
Common Lisp
Raw Permalink Normal View History

2013-04-11 01:07:29 -07:00
(format t "Enter some text: ")
(let ((s (read-line)))
(format t "You entered ~s~%" s))
(format t "Enter a number: ")
(let ((n (read)))
(if (numberp n)
(format t "You entered ~d.~%" n)
(format t "That was not a number.")))