Reading In text file.

Discussion of Common Lisp
Mercenary85
Posts: 10
Joined: Tue Apr 06, 2010 9:56 pm

Re: Reading In text file.

Post by Mercenary85 » Wed Apr 07, 2010 6:19 pm

gugamilare wrote:
Mercenary85 wrote:How do i go about "not" reading the parenthesis parts??
You don't need to "not" read the parenthesis. If some file contains something like this:

Code: Select all

(1 2 3 4 5)
then you open that file using with-open-file and you call read directly on the file, the value returned is the list (1 2 3 4 5). You don't even need to create a loop to read the list.

Your Professor put the parenthesis in the file to make it simpler to read it ;)
oh haah! fancy that.
welp I got it working. thanks a ton to everyone. especially you gugamilare!

The Assignment was actually a type of averaging/mathmatical stuff on lists, but it was just the readin part i was confused with :) thanks a ton

Post Reply