Search found 4 matches

by dhak6153
Thu Jan 14, 2010 2:38 pm
Forum: Common Lisp
Topic: Beginners Problem reading from two files simultaneously
Replies: 5
Views: 5047

Re: Beginners Problem reading from two files simultaneously

Awesome!!! Thanks a lot for pointing me towards those invaluable online resources. Now I can teach myself and get into a proficiency level that I need.

Thank you.
by dhak6153
Thu Jan 14, 2010 2:05 pm
Forum: Common Lisp
Topic: Beginners Problem reading from two files simultaneously
Replies: 5
Views: 5047

Re: Beginners Problem reading from two files simultaneously

I don't understand what your problem is. You can just open two files at the same time by nesting the WITH-OPEN-FILE macro. The main issue that I have is I am trying to read from two different files, merge the contents and display the output. The function posted above helps me read from a file and d...
by dhak6153
Thu Jan 14, 2010 1:06 pm
Forum: Common Lisp
Topic: Beginners Problem reading from two files simultaneously
Replies: 5
Views: 5047

Re: Beginners Problem reading from two files simultaneously

Here is my function that works for a single file.

(defun flist (s)
(with-open-file (input s)
(loop for line = (read-line input nil nil)
while line
collect line into lines
finally (return (values lines)))))
by dhak6153
Thu Jan 14, 2010 12:35 pm
Forum: Common Lisp
Topic: Beginners Problem reading from two files simultaneously
Replies: 5
Views: 5047

Beginners Problem reading from two files simultaneously

Hi:

I am a beginner and I am having trouble reading from two files simultaneously. I am trying to use the with-open-file macro to get the job done. Help appreciated