a.a.letterbox wrote:

> One more question.
> How do I change GENSYM-generated variable name to something human-readable?
> Eval doesn't work:
> =20
> (1) -> test_eqn := exp( symbol( GENSYM()$Lisp ) * x )
> 
>       G59678 x
> (1) %e
>                                        Type: Expression(Integer)
> (2) -> test_eqn
>
>       G59678 x
> (2) %e
>                                        Type: Expression(Integer)
> (3) -> eval( test_eqn, [ G59678 = N ] )
> 
>       G59678 x
> (3) %e
>                                         Type: Expression(Integer)

There is no way to recreate value produced by GENSYM()$Lisp
(it a feature), so you need store value:

(1) -> s := GENSYM()$Lisp pretend Symbol

   (1)  G663
                                                                 Type: Symbol
(2) -> test_eqn := exp(s*x)             

          G663 x
   (2)  %e
                                                    Type: Expression(Integer)
(3) -> eval(test_eqn, [s = N])          

          N x
   (3)  %e
                                                    Type: Expression(Integer)

You may prefer to use 'new()$Symbol' which on each call produces
new symbols, but you can recreate them from name.

-- 
                              Waldek Hebisch
[email protected] 

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to