Subject: [clisp-list] string-tokens

From: Leonardo Bitsch <[email-masked]>
Date: Wed, 7 Feb 2001 18:02:40 -0200 (EDT)

Hi...
Sorry about the simple question!
When I use 

 (values-list (string-tokens "(+ 2 3)(* 3 3)"))

the answer is
 (:+ 2 3) ;
 (:* 3 3)

I want to 'eval' this and write it to a file as:
 5
 9 
How can I take ":" out? Is it possible to define a function in a string
and after that call this function in the same string? For example:
 "(defun pl (a b) (+ a b))(pl 2 2)"
 PL
 4

Thanks,
____________________________________________________________
____________________________________________________________
Leonardo Bitsch
Graduação em Engenharia de Controle e Automação Industrial
Laboratório de Controle e Microinformática - LCMI
Universidade Federal de Santa Catarina - UFSC
Florianópolis - SC
____________________________________________________________
____________________________________________________________

---

From: Sam Steingold <[email-masked]>
Date: 07 Feb 2001 17:36:39 -0500

> * In message <[email-masked]>
> * On the subject of "[clisp-list] string-tokens"
> * Sent on Wed, 7 Feb 2001 18:02:40 -0200 (EDT)
> * Honorable Leonardo Bitsch <[email-masked]> writes:
>
> When I use 
> 
> How can I take ":" out?

(values-list (read-from-string
              (concatenate 'string "(" "(+ 2 3)(* 3 3)" "))))

> Is it possible to define a function in a string

you are trying to do the wrong thing.
there are deep package issues here, and, unless you are just playing,
you _will_ *certainly* get into trouble.
where are you getting these strings?
what are you trying to accomplish, eventually?

(you _really_ should ask this on news:comp.lang.lisp)

-- 
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
Good judgment comes from experience and experience comes from bad judgment.

---

From: Marco Antoniotti <[email-masked]>
Date: Thu, 8 Feb 2001 09:54:18 -0500

> Cc: lisp <[email-masked]>
> Reply-To: [email-masked]
> Mail-Copies-To: never
> From: Sam Steingold <[email-masked]>
> 

I see a lot of CPTTP desease going on here :).  Leonardo should really
ask himself whether he needs strings at all.

And yes.  comp.lang.lisp is a better venue for asking these
questions. :)

Cheers

-- 
Marco Antoniotti =============================================================
NYU Courant Bioinformatics Group		 tel. +1 - 212 - 998 3488
719 Broadway 12th Floor                          fax  +1 - 212 - 995 4122
New York, NY 10003, USA				 http://galt.mrl.nyu.edu/valis
             Like DNA, such a language [Lisp] does not go out of style.
			      Paul Graham, ANSI Common Lisp