Hello,
I am wondering if anyone know how to store a file of symbol
into an array? For instance in my file i have:
My name is Jan
How are you doing?
...etc
And i want to store this information into an array so that when i do
(aref array 2) ==> is
The problem is that i don't know how big the file is.
Thanks
Jan
·····@hotmail.com (Jan) writes:
> Hello,
>
> I am wondering if anyone know how to store a file of symbol
> into an array? For instance in my file i have:
>
> My name is Jan
> How are you doing?
> ....etc
>
> And i want to store this information into an array so that when i do
> (aref array 2) ==> is
>
> The problem is that i don't know how big the file is.
This sounds like something you should use a list for; push items onto
the list, and, if you _need_ to, translate the list into an array.
Ask yourself if you truly _need_ an array...
--
(reverse (concatenate 'string ··········@" "enworbbc"))
http://www.cbbrowne.com/info/linux.html
"Ahhh. A man with a sharp wit. Someone ought to take it away from him
before he cuts himself." -- Peter da Silva
On Sat, 10 Nov 2001 19:27:35 GMT, ········@acm.org wrote:
>·····@hotmail.com (Jan) writes:
>> Hello,
>>
>> I am wondering if anyone know how to store a file of symbol
>> into an array? For instance in my file i have:
>>
>> My name is Jan
>> How are you doing?
>> ....etc
>>
>> And i want to store this information into an array so that when i do
>> (aref array 2) ==> is
>>
>> The problem is that i don't know how big the file is.
>
>This sounds like something you should use a list for; push items onto
>the list, and, if you _need_ to, translate the list into an array.
>
Or look at creating an adjustable array with a fill pointer (See
MAKE-ARRAY), and using VECTOR-PUSH-EXTEND.