FunctionDeclaration

FunctionDeclaration[name,typedfun]

declares name to be a typed function suitable for use in a compiler environment.

Details

Examples

Basic Examples  (5)

FunctionDeclaration can be used in FunctionCompile:

The compilation uses the function declaration:

A function declaration can be used more than once:

Add a definition to a compiler environment:

Use the compiler environment in a compilation:

The compilation uses the function declaration:

A function declaration can be used more than once:

A function name can be used in more than one declaration:

Call one version:

Call the other version:

A function declaration can call another declaration:

Call one version:

Call the other version:

Add a definition to the default compiler environment:

Now there is no need to use a CompilerEnvironment option:

The default compiler environment can be restored to its default state:

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

Text

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

BibTeX

@misc{reference.wolfram_2021_functiondeclaration, author="Wolfram Research", title="{FunctionDeclaration}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/FunctionDeclaration.html}", note=[Accessed: 27-November-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_functiondeclaration, organization={Wolfram Research}, title={FunctionDeclaration}, year={2021}, url={https://reference.wolfram.com/language/ref/FunctionDeclaration.html}, note=[Accessed: 27-November-2021 ]}

CMS

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

APA

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