Services & Resources / Wolfram Forums
MathGroup Archive
*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: a dangerous feature of Module[]?

  • To: mathgroup at
  • Subject: [mg57507] Re: a dangerous feature of Module[]?
  • From: Scott Hemphill <hemphill at>
  • Date: Tue, 31 May 2005 04:58:58 -0400 (EDT)
  • References: <d76ol2$7si$> <d7dp1d$qag$>
  • Reply-to: hemphill at
  • Sender: owner-wri-mathgroup at

Gennady Stupakov <stupakov at> writes:

> Thanks to everybody who replied to my post.
> Experts are aware of this feature of Module, and I was referred to a 
> recent discussion of a related issue in
> I checked the description of scoping in Mathematica book (section 2.6) to 
> find out that most examples there use Set, rather then them SetDelayed, to 
> illustrate the mechanism of local variables in Module. The book totally 
> ignores all the subtleties of the scoping issues. That is frustrating -- 
> after more then 10 years programming in Mathematica I realised that many of my 
> codes might have serious bugs.

Note that Block[] behaves differently from Module[].

Scott Hemphill	hemphill at
"This isn't flying.  This is falling, with style."  -- Buzz Lightyear

  • Prev by Date: Re: Limit of list
  • Next by Date: Re: Two related question. Question 1
  • Previous by thread: Re: a dangerous feature of Module[]?
  • Next by thread: Re: a dangerous feature of Module[]?