MathGroup Archive 2006

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

Search the Archive

Re: Question about UpSet vs SetDelayed

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63782] Re: Question about UpSet vs SetDelayed
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Sat, 14 Jan 2006 02:32:26 -0500 (EST)
  • References: <dq7u2s$3r6$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

the information is stored in different places.
someFunc[a]:=a

store the information at the symbol "someFunc"
and

someOtherFunc[b]=

store the information at b. So if you remove b
the information is removed too, to remove
someFunc[a]:=a
you  must remove someFunc[] and not a.

Regards
  Jens



"Andy Somogyi" <andy_somogyi at hotmail.com> schrieb im Newsbeitrag 
news:dq7u2s$3r6$1 at smc.vnet.net...
> Hello
>
> I'm trying to work out what how exactly := and ^= differ and what are uses
> for ^=.
>
> Say I want to have some 'properties' of a symbol 's', I can do:
>
> someFunc[s] := True;
>
> and I can also do:
>
> someOtherFunc[s] ^= True;
>
> When I execute either, someFunc[s] and someOtherFunc[s], they both 
> obviously
> return True, and when I apply them to some other symbol or value for which
> they are not defined for, they both obviously return the expected result:
>
> In[20]:= someFunc[SomethingOtherThanS]
> Out[20]:= someFunc[SomehingOtherThanS]
>
> and
>
>
> In[20]:= someOtherFunc[SomethingOtherThanS]
> Out[20]:= someOtherFunc[SomehingOtherThanS]
>
> So, both := and ^= aperently behave very similarly, so my question how
> exactly do they differ and in what cases should I use one over the other?
>
> thanks
>
> 



  • Prev by Date: Second announcement of the International Mathematica Symposium 2006
  • Next by Date: Nested Packages and scoping
  • Previous by thread: Re: Question about UpSet vs SetDelayed
  • Next by thread: Re: Question about UpSet vs SetDelayed