TypeHint[expr,type]
represents an expression of a specified type when compiled and gives expr when evaluated.
TypeHint
Listing of Compiled Types »TypeHint[expr,type]
represents an expression of a specified type when compiled and gives expr when evaluated.
Examples
Basic Examples (1)
Define a function that uses TypeHint:
func = Function[{}, TypeHint[1, "UnsignedInteger8"]];TypeHint evaluates to its first argument:
func[]TypeHint uses the type specification when compiled:
funcComp = FunctionCompile[func]funcComp[]See Also
Tech Notes
Related Guides
History
Text
Wolfram Research (2022), TypeHint, Wolfram Language function, https://reference.wolfram.com/language/ref/TypeHint.html.
CMS
Wolfram Language. 2022. "TypeHint." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TypeHint.html.
APA
Wolfram Language. (2022). TypeHint. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TypeHint.html
BibTeX
@misc{reference.wolfram_2026_typehint, author="Wolfram Research", title="{TypeHint}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/TypeHint.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_typehint, organization={Wolfram Research}, title={TypeHint}, year={2022}, url={https://reference.wolfram.com/language/ref/TypeHint.html}, note=[Accessed: 12-June-2026]}