MathGroup Archive 2004

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

Search the Archive

Re: If-statement problems

  • To: mathgroup at smc.vnet.net
  • Subject: [mg49638] Re: If-statement problems
  • From: "Aaron Fude" <aaronfude at yahoo.com>
  • Date: Sun, 25 Jul 2004 02:55:48 -0400 (EDT)
  • References: <cdlj0l$83c$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Thank you to all who answered.

And the right answer is....  "if" vs. "If".

Special thanks to those, who realized that my "a, b, c, d" example was just
a demo for my problem and not a real attempt to assign values to a b c and
d. But at the same time {a, b, c, d} = {1, 2, 3, 4} was a suprizing
construct which raised another question.

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?

Thanks!

Aaron Fude


  • Prev by Date: graphs and top most nodes
  • Next by Date: RE: In Plot, horizontal range is reduced depending on PlotRange
  • Previous by thread: RE: If-statement problems
  • Next by thread: Re: Re: If-statement problems