|
[Date Index]
[Thread Index]
[Author Index]
Re: Re: Reevaluation of conditional arguments when the condition has changed
- To: mathgroup at smc.vnet.net
- Subject: [mg61134] Re: [mg61107] Re: Reevaluation of conditional arguments when the condition has changed
- From: Igor Antonio <igora at wolf-ram.com>
- Date: Tue, 11 Oct 2005 03:20:36 -0400 (EDT)
- Organization: Wolfram Research, Inc.
- References: <200510080649.CAA20991@smc.vnet.net> <diabpq$iim$1@smc.vnet.net> <200510100640.CAA26952@smc.vnet.net>
- Reply-to: igora at wolf-ram.com
- Sender: owner-wri-mathgroup at wolfram.com
albert wrote:
> Hi Igor,
>
>
>>You shouldn't expect it because you're using the Set function (=). When
>>you call:
>>
>>expr1 = foo[a b]
>>
>>It evaluates the rhs (giving "foo[a b]") and sets that *value* to the
>>value of
>>expr1. Note it's *not* the function definition foo[a b], but it's value.
>>Its value just happened to be the "unevaluated value", but it's still its
>>value. When you modify the foo function and reevaluate expr1 (I'm assuming
>>you're simply doing "expr1" in a new cell), you're simply getting that
>>value that was stored in the variable.
>>
>>That is the whole idea behind using Set vs. SetDelayed ( := )
>
>
> I don't agree, otherwise the following would be a bug:
>
> In[1]:= a=b
>
> Out[1]= b
>
> In[2]:= b=1
>
> Out[2]= 1
>
> In[3]:= a
>
> Out[3]= 1
>
> I think the difference between Set and SetDelayed is not the point in what
> David asked and I also guess that he is very aware of that difference. The
> question is whether the observation he made is an indiaction of a bug or
> not. I think it is a bug, even though Carl Woll has posted a workaround and
> that makes it not a severe problem. Maybe it would be a good idea to at
> least mention the use of UpValues as one of the possible "special
> circumstances" in the Update help. On the other hand, the usage of UpValues
> doesn't seem to be so special after all...
>
> albert
I stand corrected. Thanks for pointing my incorrect answer. :-)
--
Igor C. Antonio
Wolfram Research, Inc.
http://www.wolfram.com
To email me personally, remove the dash.
Prev by Date:
Re: SameTest in Union
Next by Date:
Re: NET/Link return array from C++
Previous by thread:
Re: Reevaluation of conditional arguments when the condition has changed
Next by thread:
RE: Reevaluation of conditional arguments when the condition has changed
|