MathGroup Archive 2007

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

Search the Archive

Re: What determines what is assigned to Out[]?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80324] Re: What determines what is assigned to Out[]?
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 17 Aug 2007 01:56:55 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <fa1bvg$79k$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

and

$HistoryLength=0

remove the "latter assigns a roughly 80MB lump of random reals to Out[]!"

and you should do that.

Regards
   Jens

Andrew Moylan wrote:
> All of the following result in % returning 1:
> 
> 1;
> 
> x = 1;
> 
> x = 1; x = Null;
> 
> Module[{}, x = 1;]
> 
> I am starting to see a pattern here. Can anyone explain the exact rule that
> determines what gets assigned to the Out[] variable?
> 
> This is important because, for example, compare the following fairly
> equivalent pieces of code:
> 
> Module[{}, m = RandomReal[1, 10000000]; flag = 1;]
> 
> Module[{}, flag = 1; m = RandomReal[1, 10000000];]
> 
> The former assigns 1 to Out[], whereas the latter assigns a roughly 80MB
> lump of random reals to Out[]!
> 
> 


  • Prev by Date: Is there a way to rewrite Roots[#n] result in easier to read form?
  • Next by Date: Re: problem using Ersek's RootSearch
  • Previous by thread: What determines what is assigned to Out[]?
  • Next by thread: Re: What determines what is assigned to Out[]?