Re: Sequence and Or
- To: mathgroup at smc.vnet.net
- Subject: [mg34232] Re: Sequence and Or
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Fri, 10 May 2002 03:05:18 -0400 (EDT)
- References: <abdf4c$cdn$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Sseziwa,
> This doesn't do what you are expecting if you place all the expressions
> in the same cell in a notebook. The % in that case will refer to the
> result of the last cell evaluated not the last expression evaluated. If
> you place these expressions in different cells and evaluate the cells in
> order you will get something closer to what you expect.
% refers to the last output whether in the same cell or a different cell
The following two inputs are in the same cell
1+1
{%}
2
{2}
But note that in the following the wrapper MatrixForm is not included.
{{1,1},{1,1}}//MatrixForm
%
1 1
1 1
{{1,1},{1,1}}
--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565
"Sseziwa Mukasa" <mukasa at jeol.com> wrote in message
news:abdf4c$cdn$1 at smc.vnet.net...
>
> On Wednesday, May 8, 2002, at 01:57 AM, DrBob wrote:
>
> > When I evaluate the following...
> >
> > {True,False,True}
> > True
> > Sequence[True,False,True]
> This is actually wrong if you evaluate the expressions in separate
> cells. At that point % refers to the value of Or@@{True,False,True}
> which is True so you will see Sequence[True] here.
> > True
> >
> > What am I missing?
> >
> I think you have a little misunderstanding of how % works.
>
> Regards,
>
> Ssezi
>
>