MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Why doesn't it work?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38488] Re: [mg38470] Re: Why doesn't it work?
  • From: Kirk Reinholtz <kirk.reinholtz at jpl.nasa.gov>
  • Date: Fri, 20 Dec 2002 04:24:37 -0500 (EST)
  • References: <atjv36$ls4$1@smc.vnet.net> <200212180654.BAA09111@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

I don't think it's quite as you state.  Put this all in a single cell:

foo=3;
foo=4;bar=%;foo=5;
blat=%
{bar,blat}

Run it, and you get {3,5}.  So, "%" is previous line, not previous
previous expression.  doesn't matter if previous line was in same or
other cell.

Orestis Vantzos wrote:
> 
> % maps to the output of the previous cell NOT the previous expression.
> So if you evaluate:
> In[1]:= expr1
> Out[1]:= out1
> 
> In[2]:= expr2;%
> Out[2]:= out1
> 
> ..and not out2.
> My advice:
> when you program in Mathematica even the simplest of functions, forget %.
> It's a bug waiting to happen..
> Orestis
> 
> "Konrad Den Ende" <konrad at voxway.com> wrote in message news:<atjv36$ls4$1 at smc.vnet.net>...
> > When i go:
> >
> > f1[x_] := something
> > tmp = int(f1[x])dx
> > f2[x_] = tmp
> >
> > then everything is nice but this:
> >
> > f1[x_] := something
> > tmp = int(f1[x])dx
> > f2[x_] = %
> >
> > just won't work. Apparetly Mathematica believes
> > that "%" mean the thing i did BEFORE the integral!
> > How come?
> >
> > --
> >
> > Vänligen
> > Konrad
> > -------------------
> > phone #1:  (+46/0) 708 - 70 73 92
> > phone #2: (+46/0) 704 - 79 96 95
> > url: http://konrads.webbsida.com
> > e-mail: konrad at voxway.com
> > -------------------


  • Prev by Date: Re: Integration bug
  • Next by Date: Cox partial likelihood function, how to solve?
  • Previous by thread: Re: Why doesn't it work?
  • Next by thread: Re: Why doesn't it work?