On Mon, May 06, 2024 at 09:24:41PM +0200, Ralf Hemmecke wrote: > On 5/6/24 20:29, Waldek Hebisch wrote: > > On Mon, May 06, 2024 at 07:33:13PM +0200, Ralf Hemmecke wrote: > > > Who can guess what the output of (3) will be just from Section 1.3.2 of > > > the > > > Book? > > > > > > %%% (1) -> x1 := 1 > > > > > > (1) 1 > > > Type: PositiveInteger > > > %%% (2) -> x2 := 2*%; x3 := 100+%; > > > > > > Type: PositiveInteger > > > %%% (3) -> [x1,x2,x3] > > > > > > > Hmm, for me FriCAS produces expected result. And while I now > > have "insider knowledge" my expectations concerning previous > > result did not chage compared to my first contact with Axiom. > > What did you expect? > > The question is whether % refers to the value of the last line (A) or to the > value of the last evaluated expression (B). > Mathematica and Axiom use semantics (A), Maple uses (B). > > I expected (B), i.e. x3=102.
Well, 'x2 := 2*%; x3 := 100+%;' is a single expression, so really no difference in this case if you say "expression" or "line". In fact, in files you may have multiline expressions, so saying "expression" is more precise. > I just say, such example should be added to the book. I would prefer: x1 := 1 x2 := 2*%; x3 := 100 + % with explantation that the second line is a compound expression. Maybe also for i in 1..2 repeat x2 := i*x2 as example of Void result. -- Waldek Hebisch -- 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 fricas-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/ZjkzD8_tfNO4VIUM%40fricas.org.