Subject: Re: Q 4 LISP GURUs: EED retreival Date: Sat, 01 Feb 1997 00:00:00 GMT From: vnestr@netvision.net.il (Vladimir Nesterovsky) Organization: IDAN Computers Newsgroups: comp.cad.autocad Easy enough for me! ;) Except for reals precision and some nasty AutoLISP bug (at least I consider it so) when (prin1 "123\"3") yeilds "123"3", thus breaking down the quotes balance for strings with inner quotes. Still it's not so common to have such strings. Thanks! On Fri, 31 Jan 1997 14:20:38 +0100, - Morten Warankov wrote in comp.cad.autocad: > Hi Vladimir, > You asked for an easy solution, well, I never give up in trying to give > you the solution you want. :) > What do you think of this 4 lines function ? Still not what you want? > ________________________________________________ > (defun cl ( a / a1) > (setq a1 "") > (foreach i a (setq a1 (strcat a1 (chb i)))) > (setq a (eval (read a1)))) > ;; a little helping function > ;; add more cond's if you need > (defun chb (l / ) > (cond ((= l "{") (setq l "(list ")) > ((= l "}") (setq l ") ")) > ((= (type l) 'INT) (setq l (strcat (itoa l) " "))) > ((= (type l) 'REAL) (setq l (strcat (rtos l) " "))) > ((= (type l) 'STR) (setq l (strcat l " "))) > (T (alert (strcat "Unknown type of data: " l))) > ) > l > ) -- Vladimir Nesterovsky ADS/LISP/C/C++ etc IDAN Computers Ltd.