Interaction of Remove and Global variables in a Module
- To: mathgroup at smc.vnet.net
- Subject: [mg120042] Interaction of Remove and Global variables in a Module
- From: blamm64 <blamm64 at charter.net>
- Date: Thu, 7 Jul 2011 07:28:13 -0400 (EDT)
This is what I get for querying SetDelayed
lhs:=rhs assigns rhs to be the delayed value of lhs. rhs is maintained
in an unevaluated form. When lhs appears, it is replaced by rhs,
evaluated afresh each time. >>
Note particularly the above reads AFRESH EACH time. It appears then
the following is inconsistent behavior based on the above description:
Apparently AFRESH is not an accurate description of how SetDelayed
operates in this case, or I am missing something about this particular
interaction of Module, Remove, and global variables inside Modules.
However, if I go back, after executing the last line above (<a> has
been Removed), and place the cursor in the input line where <f> is
defined and hit Enter, which I thought would be identical to just
evaluating <f> AFRESH again, and then execute the <f> line again,
then the global <a> definition is re-constituted.
The documentation for Remove reads the name is no longer recognized by
Mathematica. My understanding is that if the same name is defined
AFRESH, it will once again be recognized.
So if anyone would let me know what I am missing, regarding why the
definition of <a> is not created AFRESH each time <f> is evaluated, I
would appreciate it.
Please don't construe the definition of <f> as my way of
'parameterizing' a function definition, I just use that definition to
convey the apparent inconsistency.
Prev by Date:
Re: Numerical accuracy/precision - this is a bug or a feature?
Next by Date:
Re: How can I get better solution for this...?
Previous by thread:
Re: Bug 1+4/10
Next by thread:
Re: Interaction of Remove and Global variables in a Module