On 28.05.2018 21:31, Riccardo GUIDA wrote:

> 2)
> Is there an assign function such that
> 
> assign(x,z)
> 
> would be equivalent to the statement x:= z ?

Well, there a many possibilities ... depends on purpose

Use an abbreviation for instance:


(1) -> assign(var,val) ==> var:=val
                                                                   Type: Void
(2) -> assign(x,10)

   (2)  10
                                                        Type: PositiveInteger
(3) -> x

   (3)  10
                                                        Type: PositiveInteger

(4) -> assign(u,y^2+z^2)

         2    2
   (4)  z  + y
                                                    Type: Polynomial(Integer)
(5) -> u

         2    2
   (5)  z  + y
                                                    Type: Polynomial(Integer)


Or in macro notation:
(6) -> macro myass(a,b) == a:=b
                                                                   Type: Void
(7) -> myass(t,z)

   (7)  z
                                                            Type: Variable(z)
(8) -> t

   (8)  z
                                                            Type: Variable(z)



> 
> 
> thanks for any hint, ric
> 

-- 
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 https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to