MathGroup Archive 2004

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

Search the Archive

Re: If-statement problems


A = {a, b, c, d};


A=ReplacePart[A,e,1];


A

{e, b, c, d}


Bob Hanlon

> In a message dated Sun, 25 Jul 2004 07:14:51 +0000 (UTC), <
> aaronfude at yahoo.com> writes:  Supose A = {a, b, c, d} and I want to replace the 
> first element with "e".
> Apparently A[[1]] = e will have the effect of assigning e to a and not
> leaving "a" alone and setting A to {e, b, c, d}. How would I accomplish the
> latter and not the former?
> 


  • Prev by Date: Long function defintions
  • Next by Date: Re: If-statement problems
  • Previous by thread: Re: Re: If-statement problems
  • Next by thread: Re: If-statement problems