WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

SubValues [f]

gives a list of transformation rules corresponding to all subvalues (values for f[][]) defined for the symbol f.

SubValues ["symbol"]

gives a list of transformation rules corresponding to all subvalues defined for the symbol named "symbol" if it exists.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Applications  
Properties & Relations  
See Also
Related Guides
History
Cite this Page

SubValues [f]

gives a list of transformation rules corresponding to all subvalues (values for f[][]) defined for the symbol f.

SubValues ["symbol"]

gives a list of transformation rules corresponding to all subvalues defined for the symbol named "symbol" if it exists.

Details and Options

  • You can specify the subvalues for f by making an assignment of the form SubValues [f]=list.
  • The list returned by SubValues has elements of the form HoldPattern [lhs]:>rhs.

Examples

open all close all

Basic Examples  (1)

Define subvalues for a symbol f:

These are the subvalues associated with f:

Scope  (4)

SubValues returns rules corresponding to subvalues defined for a symbol:

SubValues can be defined for heads of any depth:

Create several values:

Obtain the subvalues of functions whose names start with f:

SubValues can be used to set the values directly:

Applications  (3)

Create a data object for properties that can be extracted:

These definitions are stored as SubValues :

Extract all the properties from a given object:

The resulting rules are in the order given:

Now reorder the definitions:

Copy a symbol's definitions to another symbol:

Properties & Relations  (5)

Values can be defined by immediate or delayed assignments:

HoldPattern is used to protect the rules from their own definitions:

Without the HoldPattern , the left-hand side would have evaluated:

SubValues ["sym"] will issue a message if the specified symbol does not exist:

If the symbol exists but has no definitions, an empty list is returned:

Definition and Information display subvalues but do not return them as values:

SubValues returns a value that can be used in a program:

Evaluation of an expression involves applying matching subvalues:

History

Introduced in 1991 (2.0) | Updated in 1996 (3.0) 2022 (13.2)

Wolfram Research (1991), SubValues, Wolfram Language function, https://reference.wolfram.com/language/ref/SubValues.html (updated 2022).

Text

Wolfram Research (1991), SubValues, Wolfram Language function, https://reference.wolfram.com/language/ref/SubValues.html (updated 2022).

CMS

Wolfram Language. 1991. "SubValues." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/SubValues.html.

APA

Wolfram Language. (1991). SubValues. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SubValues.html

BibTeX

@misc{reference.wolfram_2025_subvalues, author="Wolfram Research", title="{SubValues}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/SubValues.html}", note=[Accessed: 16-November-2025]}

BibLaTeX

@online{reference.wolfram_2025_subvalues, organization={Wolfram Research}, title={SubValues}, year={2022}, url={https://reference.wolfram.com/language/ref/SubValues.html}, note=[Accessed: 16-November-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /