FullDefinition
FullDefinition[symbol]
prints as the definitions given for symbol, and all symbols on which these depend.
FullDefinition[patt]
prints as the definitions given for the symbols whose names textually match the arbitrary string pattern patt, and all symbols on which these depend.
FullDefinition[{spec1,spec2,…}]
prints as the definitions given for the symbols that are equal to or whose names match any of the speci, and all symbols on which these depend.
Details and Options
- FullDefinition[symbol] recursively prints as all definitions for the symbol, and for the symbols that appear in these definitions, unless those symbols have the attribute Protected. »
- FullDefinition prints values, attributes, defaults, options and messages. »
- The pattern patt can be given as a string with metacharacters, as StringExpression[…] or as RegularExpression["regex"]. »
- Definition allows abbreviated string patterns containing the following metacharacters:
-
* zero or more characters @ one or more characters, excluding uppercase letters - The following options can be given: »
-
ExcludedContexts Automatic contexts excluded from recursive inclusion IncludedContexts All contexts considered for recursive inclusion - FullDefinition["context`*"] prints as the definitions of all symbols in a particular context. »
- FullDefinition["`*"] prints as the definitions of all symbols in the current context. »
- FullDefinition does not show rules associated with symbols that have attribute ReadProtected. »
- FullDefinition has attribute HoldAll. »
Examples
open allclose allScope (9)
Symbol Inputs (4)
For built-in symbols, FullDefinition gives attributes, defaults and options, just like Definition does:
For user-defined symbols, FullDefinition gives attributes, defaults, options, messages and definitions:
Using Patterns (5)
Specify symbols as string patterns:
Get the definitions for all symbols in the current context:
Get the definitions for all symbols in a given context:
Get the definitions for all 2-character symbols in the current context using StringExpression:
Get the definitions for all 3-character symbols using RegularExpression:
Options (2)
ExcludedContexts (1)
By default, certain system-internal contexts are excluded from recursive inclusions:
Use ExcludedContexts{} to include definitions of all non-protected symbols:
Properties & Relations (8)
FullDefinition recursively prints the definitions of unprotected symbols appearing in the definition of a symbol:
Note that the definition of h is included, but not the definition of the protected symbol g:
For a symbol whose definition does not depend on others, FullDefinition is generally equivalent to Definition:
For read-protected symbols, definitions are not given:
FullDefinition gives attributes, defaults, options, messages and values:
FullDefintion[pattern] gives recursive definitions for the symbols returned by Names[pattern]:
Save writes the output of FullDefinition to a file:
Definition does not give messages:
FullDefinition does give messages:
Use Messages to get the messages:
FullDefinition has the attribute HoldAll:
Possible Issues (4)
FullDefinition is an output form; it does not evaluate:
By default, definitions attached to "System`" symbols are not pulled in:
Use ExcludedContexts{} to pull in definitions from all contexts:
Alternatively, attach definitions to your own symbols:
FullDefinition["symbol"] gives no values if there is no symbol named "symbol":
FullDefinition["symbol"] also gives no values if symbol has no values:
When using a pattern without a context mark, all definitions for matching symbols on $ContextPath are given:
Use a pattern with an explicit context mark to avoid potentially matching symbols from system or other contexts:
Text
Wolfram Research (1988), FullDefinition, Wolfram Language function, https://reference.wolfram.com/language/ref/FullDefinition.html (updated 2022).
CMS
Wolfram Language. 1988. "FullDefinition." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/FullDefinition.html.
APA
Wolfram Language. (1988). FullDefinition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FullDefinition.html