Ted Kosan ted.kosan@gmail.com writes:
Hello,
I am currently working through the "Land of Lisp" book by Conrad Barski and I am using ABCL to run all of the code in the book. In the following code, the prompt that is printed by 'print' is not seen until after 'read' returns:
(defun add-five() (print "Pleaser enter a number:") (let ((num (read))) (print "When I add five I get") (print (+ num 5))))
Is it possible to configure ABCL to have the output from 'print' be visible immediately so that it can be used to prompt the user to input some information?
The portable way to do it is to call (force-output) or (finish-output) after printing the prompt.
Zach