Ha! I have kids so finding/remembering where "goofy" or the "little lightning McQueen car" is every two seconds must have helped.
I hope that procedure isn't the only thing of his you've read. The man is gifted. In fact, I remember seeing a thread where he gave a solution to store lists of data in xrecords of the dwg file (I'm sure he did something similar to this in that task so there's a common thread in there somewhere). The man's code inspired so much; just reading a thread or function would inspire so many ideas -e.g. after reading one of his functions you learned that you could use a simple function like IF in a whole new way. I've posted at least one full program of his (or at least one that I've pieced together/fixed/etc). I think it was a bench-marking/profiling tool.
Glad my bumbling lead to something better.
...
That looks/reminds me of a procedure by Vladimir Nesterovsky. ...I studied his code quite a bit (a wonderful programmer)!
The procedure handles the nested lists because it's recursive.
You have a good memory, John - :thumbsup_emoji:
Right after I ended writing & testing the subfoo it reminded me of V.Nesterovsky's safearray value subfoo, which basically has the same algorithm..
Well atleast we have another use of it in our pocket.
I wonder if the top most eval (line 4) is needed in the first procedure because of how COND works (of course, please excuse my mistake if I'm wrong; still a bit rusty).
Good thought, at first I tried just a wrap of: (eval (cdr (assoc (type ... )))) , but then I realised that I won't be able to do an else statement,
unless I don't fill in all the variable types i.e.: INT/REAL/STRING/VARIANT/OBJECT... etc, as additional cases - so then I implemented the cond.
But now you mention it - eval is required only to evaluate the result from the quoted list, so more effective version of it would be:
(defun symval
( symval:x
) (
'(
)
)
)
)
)
( symval:x )
)
); defun symval