On Wed, Jul 2, 2014 at 10:43 PM, Nils Bruin <nbr...@sfu.ca> wrote: > On Wednesday, July 2, 2014 10:14:44 AM UTC-7, Jole Bradbury wrote: >> >> 2) I've noticed on the Sage Cell Server demo online that typing Maxima >> code will result in every line being evaluated but Sage code only evaluates >> the last line. For example, >> integrate(1,x) >> integrate(2,x) >> In "Sage" code will return: 2 > > All lines do execute. It's just only printing the result of the last line (I > wouldn't mind if that got changed). If you try > > print integrate(1,x) > print integrate(2,x) > > you'll see both results. > (I can't help you with the other questions, but hopefully having this > little fact corrected is also helpful somehow)
For what it is worth, the Sage Notebook and Sage Cell work that way because at the time (2006) that we implemented the first version, we couldn't figure out how to get it to work the way Jole wants. And that weird design just sort of stuck. In SageMathCloud, doing integrate(1,x) integrate(2,x) outputs x 2*x It does this properly by breaking the input into blocks, and exec'ing each block separately. I think SageCell (and IPython Notebook, etc.) should do the same, but nobody listens to me when I suggest this. -- William -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.