Re: DownValues

• To: mathgroup at smc.vnet.net
• Subject: [mg113744] Re: DownValues
• From: Stephan <stschiff80 at googlemail.com>
• Date: Wed, 10 Nov 2010 06:28:25 -0500 (EST)

```Thanks everyone for your replies. It's nice to have this command at hand.

Stephan

Am 09.11.2010 um 08:52 schrieb Bob Hanlon:

>
> The documentation on SubValues is extremely limited but it is not totally undocumented.
>
> Names["*Values"]
>
> {DefaultValues, DownValues, DynamicModuleValues, FormatValues, NValues, OwnValues, SingularValues, SubValues, UpValues}
>
> Information[SubValues]
>
> SubValues[f] gives a list of transformation rules corresponding to all subvalues (values for f[x,\[Ellipsis]][\[Ellipsis]], etc.) defined for the symbol f.
>
> Attributes[SubValues]=={HoldAll,Protected}
>
> Options[SubValues]=={Sort->True}
>
>
> It is also referenced in:
> ref/message/DownValues/vlist
> ref/message/DownValues/vrule
> ParallelTools/tutorial/RemoteDefinitions
>
>
> Bob Hanlon
>
> ---- Albert Retey <awnl at gmx-topmail.de> wrote:
>
> ==========================
> Am 08.11.2010 09:38, schrieb Stephan:
>> Hi,
>>
>> Is there any way to find out about definitions like:
>>
>> 	f[1][2] == 3 ?
>>
>> Here is a sample run:
>>
>> In[1]:== f[1][2] == 3
>> Out[1]== 3
>> In[2]:== DownValues[f]
>> Out[2]== {}
>> In[3]:== DownValues[f[1]]
>> 	During evaluation of In[3]:== DownValues::"sym" :  "
>> 	StyleBox[\"\\\"\< is expected to be a symbol.\>\\\"\", \"MT\"]  \
>> Out[3]== DownValues[f[1]]
>>
>> So with "DownValues" I can't seem to learn about the definition f[1][2].=
..
>
> SubValues, unfortunatly seem to be undocumented, but gives you what you
> are looking for:
>
> SubValues[f]
>
> hth,
>
> albert
>
>

```

• Prev by Date: Re: pause button for Dynamic?
• Next by Date: Re: Default Value for SetterBar
• Previous by thread: Re: DownValues
• Next by thread: pure function