Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Why is y a local variable here?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63099] Re: [mg63085] Why is y a local variable here?
  • From: ggroup at sarj.ca
  • Date: Wed, 14 Dec 2005 04:36:00 -0500 (EST)
  • References: <200512130841.DAA08255@smc.vnet.net>
  • Reply-to: ggroup at sarj.ca
  • Sender: owner-wri-mathgroup at wolfram.com

On Tuesday, December 13, 2005 at 03:41 GMT -0500, Steven T. Hatton wrote:
<snip>
> I do not understand why y is not "contaminated" by the global value when it
> appears in sd[y_] = SDP[n - 1, y];. Can someone explain this?

Don't you need to use SetDelayed instead of Set?  In other words,
doesn't the syntax for a function definition need to be something
like: sd[y_]:=SDP[x-1, y]; or sd=Function[y, SDP[x-1,y]; ?


  • Prev by Date: Opener Icons for cell group.
  • Next by Date: Parametric Numerical Integral
  • Previous by thread: Why is y a local variable here?
  • Next by thread: Re: Why is y a local variable here?