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
> 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
<············@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