Re: Funny Behavior of Module
- To: mathgroup at smc.vnet.net
- Subject: [mg124759] Re: Funny Behavior of Module
- From: Shizu <slivo.vitz at msa.hinet.net>
- Date: Sat, 4 Feb 2012 06:31:17 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
Without the assignment x = y, the procedure works fine. When we introduce the redundant assignment (done by Louis on purpose), Mathematica treats it as an initialization, and so global variable y is assigned to x first, and so a = y^2. But it's should be in the {} for local variables and initializations. But then if it's in the {}, we should not assign something to x which is an argument. The x = y here should not affect the value of a. Hence I think this is a bug -- M thinks that x = y is an initialization.