On 9/6/10 9:27 PM, William Stein wrote:
On Monday, September 6, 2010, Jason Grout<[email protected]>  wrote:
On 9/6/10 6:02 PM, Alasdair wrote:

As you know, when you define a new variable:

sage: a = 2

the value is not automatically displayed.  So you have to:

sage: a = a+3; a

to display it.  This is different to all other CAS's (at least to my
knowledge), where a variable assignment automatically returns the
result unless you ask it not to.

Magma behaves the same way as Sage here, i.e., Magma does not autoprint.

Someone could implement is for Sage by adding a post eval hook that
checks for new variables in globals() then prints them...


So Alasdair, how would you handle the printing for something like:

sage: u,v = 3,4

or

sage: u,v = v,u # swap values of u and v

Thanks,

Jason

--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to