From: daniel
Subject: reading a case sensitive from a file
Date: 
Message-ID: <BQ1Of.75815$Q22.20325@fe1.news.blueyonder.co.uk>
Hi there,

I'm trying to read a set of lists from a file. Each list contains a string
and a vector, as such:

(aBc (1 0 1 0 1)

The string is case sensitive, and the vector is needed for computations.

As far as I know, I can read this list in two ways, using 'read' (with a
list of lists in the file), or 'read-line' with just one list on each line.
My problem is that when I use 'read', a list will be read, preserving the
numerical character of the vector, but capitalizing the string (which is a
nono). Using read, a string will be read, resulting in an input like:

"(aBc" "(1" "0"  "1" "0" "1)"

This is fine for the string as it preseves case, but not the vector, as I
need to compare the numerical value of the vector with other vectors.

So, I essentially want to use 'read', while preserving the case of any
alfabetic characters in the list. Is there an easy way to accomplish this?

Thanks,

Daniel

From: ············@gmail.com
Subject: Re: reading a case sensitive from a file
Date: 
Message-ID: <1141420167.713057.209830@j33g2000cwa.googlegroups.com>
> So, I essentially want to use 'read', while preserving the case of any
> alfabetic characters in the list. Is there an easy way to accomplish this?

See http://www.lisp.org/HyperSpec/Body/sec_23-1-2-1.html

Cheers,

Carlos
From: daniel
Subject: Re: reading a case sensitive from a file
Date: 
Message-ID: <tYfOf.78027$Q22.18215@fe1.news.blueyonder.co.uk>
<············@gmail.com> wrote in message 
·····························@j33g2000cwa.googlegroups.com...
>> So, I essentially want to use 'read', while preserving the case of any
>> alfabetic characters in the list. Is there an easy way to accomplish 
>> this?
>
> See http://www.lisp.org/HyperSpec/Body/sec_23-1-2-1.html
>
> Cheers,
>
> Carlos
>

That's great. Job done.

Cheers,

Daniel