       More fun and games

• To: mathgroup at smc.vnet.net
• Subject: [mg102139] More fun and games
• From: AES <siegman at stanford.edu>
• Date: Thu, 30 Jul 2009 05:34:16 -0400 (EDT)
• Organization: Stanford University

```Interesting to try

expr

%

%%%

%%%%%

with different choices of expr.  For example

In:= Do[ y=k, {k,1,3} ]

In:= %

In:= %%%

Out= Out

In:= %%%%%

Out= Out

I suppose "Out" means "%%...%" ran off the top of the notebook,
though I don't see this in the Help msg for the symbol Out.

But then, more surprisingly,

In:= Do[ y=k; , {k,1,3} ]

In:= %

Out= 3

In:= %%%

Out= Out

In:= %%%%%

Out= Out

and then

In:= y=1
y=2
y=3
Out= 1
Out= 2
Out= 3
In:= %
Out= 3
In:= %%%
Out= 2
In:= %%%%%
Out= 1

and

In:= y=4;
y=5;
y=6;
In:= %
Out= 6
In:= %%%
Out= Out
In:= %%%%%
Out= Out

but

In:= y=7
y=8
y=9;
Out= 7
Out= 8
In:= %
Out= 9
In:= %%%
Out= 8
In:= %%%%%
Out= 7

[I was Quitting and reStarting the kernel between each case here.]

Looks like that final  y=k(;)  in a compound expression returns a value
whether the ; is there or not.

```

• Prev by Date: Multiplication of matrices
• Next by Date: Re: The audience for Mathematica (Was: Show doesn't work inside Do
• Previous by thread: Re: Multiplication of matrices
• Next by thread: Re: Thoughts on a Wolfram|Alpha