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: [mg51835] Re: [mg51794] Re: newbie question on functions
  • From: DrBob <drbob at bigfoot.com>
  • Date: Wed, 3 Nov 2004 01:24:34 -0500 (EST)
  • References: <cm22t7$gk1$1@smc.vnet.net> <cm4r7j$6lm$1@smc.vnet.net> <200411020705.CAA21661@smc.vnet.net>
  • Reply-to: drbob at bigfoot.com
  • Sender: owner-wri-mathgroup at wolfram.com

> 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]

That's exactly wrong. For example:

list={a,b}
AppendTo[list,c];
list

{a,b}

{a,b,c}

Bobby

On Tue, 2 Nov 2004 02:05:23 -0500 (EST), AES/newspost <siegman at stanford.edu> 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.
>
>
>
>



-- 
DrBob at bigfoot.com
www.eclecticdreams.net


  • Prev by Date: Re: Graphics and Random[] questions
  • Next by Date: Re: dashing the lines make the plot looks so bad
  • Previous by thread: Re: Re: newbie question on functions
  • Next by thread: Re: Re: newbie question on functions