Re: Re: newbie question on functions
- To: mathgroup at smc.vnet.net
- Subject: [mg51848] Re: [mg51794] Re: newbie question on functions
- From: Christopher Purcell <christopherpurcell at mac.com>
- Date: Wed, 3 Nov 2004 01:25:47 -0500 (EST)
- References: <cm22t7$gk1$1@smc.vnet.net> <cm4r7j$6lm$1@smc.vnet.net> <200411020705.CAA21661@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
You probably meant to use Append in your example of unexpected behaviour, since AppendTo works as one might hope. junk={1,2,3}; Append[junk,4] {1,2,3,4} junk {1,2,3} But AppendTo actually does what its name suggests: junk={1,2,3}; AppendTo[junk,4] {1,2,3,4} junk {1,2,3,4} christopherpurcell at mac.com AIM/iChatAV: cffrc On Nov 2, 2004, at 3:05 AM, 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. >
- References:
- Re: newbie question on functions
- From: AES/newspost <siegman@stanford.edu>
- Re: newbie question on functions