am really new to LISP. I am using LispWorks and having issues on how to accept string input from the keyboard. Here is my code below compiles well but when I run, it gives an error:
"End of file while reading stream #<Synonym stream to BACKGROUND-INPUT>."
(defun get-input (prompt)
(clear-input)
(write-string prompt)
(finish-output)
(let ((x (read-line)))
(write-string x)
(close x)))
(write-string (get-input "Enter a sentence: "))
(finish-output)
I have tried all sorts of codes using "read" to no avail, someone pls help.
The code below solved my problems: