MathGroup Archive 2011

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

Search the Archive

Re: Please Help Eliminate My Ignorance

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118572] Re: Please Help Eliminate My Ignorance
  • From: David Skulsky <edskulsky at gmail.com>
  • Date: Tue, 3 May 2011 05:46:41 -0400 (EDT)
  • Reply-to: comp.soft-sys.math.mathematica at googlegroups.com

I believe the problem with the second case is that the definition of test[] ends after the x=1; statement.  Mathematica subsequently processes Append[p,p[[4]]]; separately.  Since p hasn't been defined, it generates an error.  To fix the problem, use (for example) parenthesis:

test[p_]:=(x=1;Append[p,p[[4]]]);

David


  • Prev by Date: Re: NIntegrate and speed
  • Next by Date: Re: and color via PlotStyle
  • Previous by thread: Please Help Eliminate My Ignorance
  • Next by thread: Re: Please Help Eliminate My Ignorance