Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: Re: newbie question on functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg51813] Re: [mg51794] Re: newbie question on functions
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Wed, 3 Nov 2004 01:23:27 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

On 2 Nov 2004, at 16:05, AES/newspost wrote:

> In article <cm4r7j$6lm$1 at smc.vnet.net>,
>  David Bailey <dave at Remove_Thisdbailey.co.uk> wrote:
>
>> Yes, of course you can save the result of a calculation. For example:
>>
>> result=intensity[4.,5.]
>
>
> For the original "newbie" poster:
>
> For newbies, or less expert users like me, it's easy to think that
> something like
>
>     AppendTo[list, expr]
>
> is a "command" that will do what it says: append expr to list.  Takes a
> few bad experiences to realize that you actually have to say
>
>     list = AppendTo[list,expr]
>
> Same general principle applies more broadly.
>
>
Actually in this particular case you are wrong. You are confusing 
AppendTo with simple Append.

AppendTo[list, expr]

is in fact enough and is equivalent to

list=Append[list,expr]



Andrzej Kozlowski
Chiba, Japan
http://www.akikoz.net/~andrzej/
http://www.mimuw.edu.pl/~akoz/


  • Prev by Date: Re: Hide Mathematica kernel window
  • Next by Date: Re: Null entry in a Graphics list?
  • Previous by thread: Re: Re: newbie question on functions
  • Next by thread: Re: Re: newbie question on functions