InertExpression

InertExpression[expr]

creates an inert expression in compiled code.

Details

Examples

open allclose all

Basic Examples  (1)

Compile a program that returns an expression:

Run the program:

Scope  (4)

Inert expressions can be manipulated without being evaluated:

Construct an inert expression, wrapping it in Hold before returning from compiled code:

By default, inert expressions are not evaluated:

InertEvaluate can be used to request evaluation:

Inert expressions are automatically converted to expressions and evaluated when returned from compiled code:

Properties & Relations  (1)

Inert expressions can be evaluated with InertEvaluate:

Possible Issues  (3)

InertExpression only works in compiled code:

Inert expressions may evaluate when returned from compiled code:

Wrap inert expressions in Hold before returning to prevent them from being evaluated:

InertExpression does not take compiler variables into account:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2024_inertexpression, organization={Wolfram Research}, title={InertExpression}, year={2022}, url={https://reference.wolfram.com/language/ref/InertExpression.html}, note=[Accessed: 21-December-2024 ]}