Original Post
For fun(and learning), Im writing a function that outputs a list to a file, without parenthesis...I dont know if there is an easier way to do it, but I would like to figure out what my problem is:
(defun foList(f l)
(let
((ostream (open f :direction :output)))
(loop for I from 0 to (- (length l) 1)
do (
(prin1 (concatenate 'string (elt l I) " ") ostream)
)
(close ostream)))
so..
foList stands for fileOutputList...or something...
(foList "holycrap.txt" (list 'WOW 'IM 'RETARDED))
should output in the file "holycrap.txt":
WOW IM RETARDED
Before I had tried to add the space in between each one, it would output this:
WOWIMRETARDED
...no good...
the line (prin1 (concatenate 'string (elt l I) " ") crashes in Corman Lisp, yet
(prin1 (concatenate "abc" " "))
works fine...
Any Ideas?
Lord Hen
[edited by - Lord Hen on October 20, 2003 1:04:03 AM]
[edited by - Lord Hen on October 20, 2003 1:47:22 AM]