TemplateExpression

TemplateExpression[expr]

represents an expression held until a template is applied, and then evaluated.

Details and Options

Examples

open allclose all

Basic Examples  (1)

Prevent evaluation until a template is applied:

Options  (1)

InsertionFunction  (1)

Use InsertionFunction to specify a function to apply before the TemplateExpression is inserted:

The default value of Inherited causes the InsertionFunction to be inherited from any containing template constructs:

Specifying an InsertionFunction for the TemplateExpression overrides the value inherited from other constructs:

Properties & Relations  (1)

Functions like StringTemplate generate a TemplateObject that specifies an appropriate InsertionFunction. This InsertionFunction is then inherited by constructs such as TemplateExpression:

TemplateExpression[expr] will not evaluate expr before inserting the result into the template, independent of whether evaluation would normally occur in that part of the result:

Wolfram Research (2014), TemplateExpression, Wolfram Language function, https://reference.wolfram.com/language/ref/TemplateExpression.html.

Text

Wolfram Research (2014), TemplateExpression, Wolfram Language function, https://reference.wolfram.com/language/ref/TemplateExpression.html.

CMS

Wolfram Language. 2014. "TemplateExpression." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TemplateExpression.html.

APA

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

BibTeX

@misc{reference.wolfram_2024_templateexpression, author="Wolfram Research", title="{TemplateExpression}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/TemplateExpression.html}", note=[Accessed: 08-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_templateexpression, organization={Wolfram Research}, title={TemplateExpression}, year={2014}, url={https://reference.wolfram.com/language/ref/TemplateExpression.html}, note=[Accessed: 08-December-2024 ]}