home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / cad / jun93.zip / TIP876.LSP < prev    next >
Lisp/Scheme  |  1993-05-19  |  522b  |  22 lines

  1. ; TIP 876: FILE2SCR.LSP (C)1993, MARK H. MILLER
  2. ; File2scr.lsp is for use within other LISP code.
  3. ; Lists a text file to the screen.  
  4. ; Does not test for file existence.
  5.  
  6. (defun f2s (FILE)
  7.      (setq F (open FILE "r"))
  8.      (while (setq L (read-line F))
  9.      (write-line L))
  10.      (setq F (close F))
  11.      (princ)
  12. )
  13.  
  14. ; This next routine does the same thing only does not offer the
  15. ; flexibility of the one above.
  16. (defun f2s2 (FILE)
  17.      (setvar "cmdecho" 0)
  18.      (command ".type" FILE)
  19.      (princ)
  20. )
  21.  
  22.