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.
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 all close allBasic Examples (1)
Scope (9)
Symbol Inputs (4)
For built-in symbols, FullDefinition gives attributes, defaults and options, just like Definition does:
FullDefinition[Information]Definition[Information]For user-defined symbols, FullDefinition gives attributes, defaults, options, messages and definitions:
SetAttributes[f, Listable];
Default[f] = 0;
Options[f] = {opt1 -> def1, opt2 -> def2};
f::usage = "message";
f[x_.] := g[x ^ 2];FullDefinition[f]Print the definitions of several symbols:
a = 5;
f[x_] := x ^ 3Definition[{f, a}]Use a combination of symbols and symbol names:
x1 = 1;x2 = 3;x3 = 5;Definition[{x1, "x2"}]Using Patterns (5)
Specify symbols as string patterns:
x1 = 1;x2 = 3;y = 5;FullDefinition["x*"]Get the definitions for all symbols in the current context:
x1 = 1;x2 = 3;y = 5;FullDefinition["`*"]Get the definitions for all symbols in a given context:
abc`x1 = 1;abc`x2 = 3;abc`x3 = 5;FullDefinition["abc`*"]Get the definitions for all 2-character symbols in the current context using StringExpression:
x1 = 1;x2 = 3;y = 5;FullDefinition["`" ~~ _ ~~ _]Get the definitions for all 3-character symbols using RegularExpression:
x = 1;yy = 3;zzz = 5;FullDefinition[RegularExpression["`..."]]Options (2)
ExcludedContexts (1)
By default, certain system-internal contexts are excluded from recursive inclusions:
x := $TimeZone
FullDefinition[x]Use ExcludedContexts{} to include definitions of all non-protected symbols:
FullDefinition[x, ExcludedContexts -> {}]Properties & Relations (8)
FullDefinition recursively prints the definitions of unprotected symbols appearing in the definition of a symbol:
g[x_] := x ^ 2;
Protect[g];h[x_] := x ^ 3f[x_] := g[x] + h[x]Note that the definition of h is included, but not the definition of the protected symbol g:
FullDefinition[f]For a symbol whose definition does not depend on others, FullDefinition is generally equivalent to Definition:
SetAttributes[f, Listable];
f[x_] := x ^ 2FullDefinition[f]Definition[f]For read-protected symbols, definitions are not given:
f[x_] := x ^ 2;
SetAttributes[f, {ReadProtected}]FullDefinition[f]FullDefinition gives attributes, defaults, options, messages and values:
SetAttributes[f, Listable];
Default[f] = 0;
Options[f] = {opt1 -> def1, opt2 -> def2};
f::usage = "message";
f[x_.] := x ^ 2FullDefinition[f]FullDefinition[pattern] gives recursive definitions for the symbols returned by Names[pattern]:
x = 1;y = 2;xy = 3;
FullDefinition["x*"]FullDefinition[Evaluate@Names["x*"]]Save writes the output of FullDefinition to a file:
g[x_] := x ^ 3SetAttributes[f, Listable];
f[x_] := g[x ^ 2]Save["stdout", f]Definition does not give messages:
f::usage = "f[x] gives (x - 1)(x + 1)";Definition[f]FullDefinition does give messages:
FullDefinition[f]Use Messages to get the messages:
Messages[f]FullDefinition has the attribute HoldAll:
FullDefinition[FullDefinition]This gives the definition of symbol itself:
symbol = {"x", "y", "z"};x = 1;y = 3;z = 5;FullDefinition[symbol]This gives the definition of its value:
FullDefinition[Evaluate[symbol]]Possible Issues (4)
FullDefinition is an output form; it does not evaluate:
FullDefinition[Plus]FullForm[%]By default, definitions attached to "System`" symbols are not pulled in:
x := Subscript[y, 1]
Subscript[y, 1] := 17
FullDefinition[x]Use ExcludedContexts{} to pull in definitions from all contexts:
FullDefinition[x, ExcludedContexts -> {}]Alternatively, attach definitions to your own symbols:
Clear[Subscript]
y/:Subscript[y, 1] = 17
FullDefinition[x]FullDefinition["symbol"] gives no values if there is no symbol named "symbol":
NameQ["x"]FullDefinition["x"]FullDefinition["symbol"] also gives no values if symbol has no values:
xNameQ["x"]FullDefinition["x"]When using a pattern without a context mark, all definitions for matching symbols on $ContextPath are given:
x = 1;y = 2;xy = 3;
FullDefinition[_ ~~ _]Use a pattern with an explicit context mark to avoid potentially matching symbols from system or other contexts:
FullDefinition["`" ~~ _ ~~ _]Tech Notes
Related Guides
Related Workflows
- Find All Defined Functions
History
Introduced in 1988 (1.0) | Updated in 2021 (12.3) ▪ 2022 (13.2)
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
BibTeX
@misc{reference.wolfram_2026_fulldefinition, author="Wolfram Research", title="{FullDefinition}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/FullDefinition.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_fulldefinition, organization={Wolfram Research}, title={FullDefinition}, year={2022}, url={https://reference.wolfram.com/language/ref/FullDefinition.html}, note=[Accessed: 13-June-2026]}