MathGroup Archive 2006

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

Search the Archive

Re: Recalculating values in tables?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63922] Re: Recalculating values in tables?
  • From: AES <siegman at stanford.edu>
  • Date: Sun, 22 Jan 2006 00:52:36 -0500 (EST)
  • Organization: Stanford University
  • References: <200601200932.EAA22054@smc.vnet.net> <dqspfk$cgk$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <dqspfk$cgk$1 at smc.vnet.net>, ggroup at sarj.ca wrote:

> No.  Try it with a simple example:
> 
> f1 := n++;
> f2 := i++;
> n = i = 1;
> Table[{f1, f1, f1, f2, f2, f2}, {10}] // InputForm
> 
> This gives the output:
> {{30, 29, 28, 1, 2, 3}, {27, 26, 25, 4, 5, 6},
>  {24, 23, 22, 7, 8, 9}, {21, 20, 19, 10, 11, 12}, 
>  {18, 17, 16, 13, 14, 15}, {15, 14, 13, 16, 17, 18}, 
>  {12, 11, 10, 19, 20, 21}, {9, 8, 7, 22, 23, 24}, 
>  {6, 5, 4, 25, 26, 27}, {3, 2, 1, 28, 29, 30}}
> 
> > Or should I always take the messier of route of coding these functions 
> > explicitly in my initialExpressions using something like
> 
> Sure looks like it.

For sure, in this case.  Good point.

But this is not the kind of case I was considering; and I think I'd know 
enough not to do something like this (even setting aside the fact that 
n++ is not a structure I personally ever happen to use in writing 
programs)


  • Prev by Date: Re: Puzzle Challenge
  • Next by Date: Re: Re: Getting the value of the independent var from the dep.var using NDSolve
  • Previous by thread: Re: Recalculating values in tables?
  • Next by thread: Re: Re: Recalculating values in tables?