[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



I am trying to get the following code prompt for a filename
and print out the contents on the console at a speed determined
by rate. I will appreciate any help on how to make it pause after
princ to accept the filename.

==================================================================

(defun type-it-slow (rate)
  (let ((text-stream nil)
        (char nil))
    (terpri)
    (princ "Type in the name of a file:")
    (setf text-stream
      (open (read-line) :direction :input))
    (loop
      (setf char (read-char text-stream nil 'eof))
      (when (equal char 'eof)
            (close text-stream)
            (return))
      (dotimes (wait rate))
            (write-char char))))

=================================================================

H. I. SALEH
salehh@atlantis.cs.orst.edu