Variable ListOfLists looks like this:
("NamesListAll1" "NamesListAll2" "NamesListAll3" etc)
I can then place a string into NamesListAll1 by the following:
(set (read (nth 0 listoflists))"Just a string")
However, instead of a string, I want a list inside NamesListAll1 -- such as
("Mary" 13.7) -- but I don't know how to do it.
I'm tearing out what little hair I have on this one. Any tips?
Len Miller
Fatfreek wrote:
> Variable ListOfLists looks like this:
> ("NamesListAll1" "NamesListAll2" "NamesListAll3" etc)
>
> I can then place a string into NamesListAll1 by the following:
>
> (set (read (nth 0 listoflists))"Just a string")
>
> However, instead of a string, I want a list inside NamesListAll1 --
> such as
> ("Mary" 13.7) -- but I don't know how to do it.
>
> I'm tearing out what little hair I have on this one. Any tips?
Why shouldnt'
(set (intern (first list-of-lists)) '("Mary" 13.7))
work?
BTW. I see signs of Perlite compounded by Tcl syndrome, aggravated by
Rubyella in the example above.
Are you sure that is what you want to do? :)
Cheers
marco
My apology, Marco.
I actually wish to have NamesListAll1appear as (("Mary" 13.7)("Josh"
0.9)("Susan" 855.3) etc). Therefore, I wish to CONStruct these two-item
lists as I proceed.
Further apology -- this is AutoLISP I am working in but I'm at my wits end.
I've appealed in Autocad's customization forum with no response so far.
Len
"Marco Antoniotti" <·······@cs.nyu.edu> wrote in message
······················@typhoon.nyu.edu...
>
>
> Fatfreek wrote:
>
> > Variable ListOfLists looks like this:
> > ("NamesListAll1" "NamesListAll2" "NamesListAll3" etc)
> >
> > I can then place a string into NamesListAll1 by the following:
> >
> > (set (read (nth 0 listoflists))"Just a string")
> >
> > However, instead of a string, I want a list inside NamesListAll1 --
> > such as
> > ("Mary" 13.7) -- but I don't know how to do it.
> >
> > I'm tearing out what little hair I have on this one. Any tips?
>
>
> Why shouldnt'
>
> (set (intern (first list-of-lists)) '("Mary" 13.7))
>
> work?
>
>
> BTW. I see signs of Perlite compounded by Tcl syndrome, aggravated by
> Rubyella in the example above.
>
> Are you sure that is what you want to do? :)
>
> Cheers
>
> marco
>
"Fatfreek" <········@ZAPCAPSarkansas.net> wrote in message news:<······················@arkansas.net>...
> Variable ListOfLists looks like this:
> ("NamesListAll1" "NamesListAll2" "NamesListAll3" etc)
>
> I can then place a string into NamesListAll1 by the following:
>
> (set (read (nth 0 listoflists))"Just a string")
What? The Common Lisp READ function requires a stream argument.
Perhaps you want:
(set (read-from-string (nth 0 listoflists)) "Just a string")
which is pretty awful. You are parsing a string at run time to produce
an interned symbol, and then modifying its SYMBOL-VALUE.
> However, instead of a string, I want a list inside NamesListAll1 -- such as
> ("Mary" 13.7) -- but I don't know how to do it.
>
> I'm tearing out what little hair I have on this one. Any tips?
I'm tearing out my hair trying to fathom what you are trying to
accomplish here, and in what strange Lisp dialect.