Subject: [clisp-list] newbie question about warnings

From: [email-masked]
Date: Wed Jul 7 14:47:35 2004

I have this form in a file called bsx-common.lisp. It runs on a win32 
machine and is supposed to make sure the line endings are in 0x0d0x0a format 
(ie dos/windows line endings). I generally call this form like this: 

(mapcar #'(lambda (file) (crlf file)) (directory "*.txt")) 

(defun crlf (file)
 (let ((crlf-name (format nil "~a.crlf" file))
	(out nil)
	(in nil))
   (setf out (open crlf-name :direction :output :if-exists :supersede))
   (with-open-file (in file :direction :input)
     (do ((line (read-line in) (read-line in nil 'eof)))
	  ((eq line 'eof) "Done.")
	(format out "~a~%" line)))
   (close out)
   (move-file crlf-file file))) 

when I run 'clisp -q -c bsx-common.lisp' I get the following output: 

Compiling file H:\bsxruby\bsx-common.lisp ...
WARNING in CRLF in lines 48..58 :
CRLF-FILE is neither declared nor bound,
it will be treated as if it were declared SPECIAL.
WARNING in CRLF in lines 48..58 :
variable IN is not used.
Misspelled or missing IGNORE declaration? 

Wrote file H:\bsxruby\bsx-common.fas
The following special variables were not defined:
CRLF-FILE
0 errors, 2 warnings 

I don't understand how this warning is coming about since the CRLF-FILE 
variable is defined in the LET and should also be bound there (maybe I'm 
using wrong terminology here...) (I'm not worried about the unused variable 
IN since originally it wasn't there but I was trying stuff out to figure out 
the other issue with CRLF-FILE). 

Any help or advice or pointers to rtfm would be appreciated. 

Jeff

---

From: Arseny Slobodjuck <[email-masked]>
Date: Thu Jul 8 01:51:08 2004

> CRLF-FILE variable is defined in the LET

> Any help or advice or pointers to rtfm would be appreciated. 
Try to get some sleep and then, take a look to your code again ;)

-- 
Best regards,
 Arseny

---

From: [email-masked]
Date: Thu Jul 8 07:26:32 2004

hmm... the sleep suggestion was a good one. I hate it when I make that kind 
of mistake. 

Sorry for the noise on the list. 

Jeff