CompilerEnvironmentAppendTo[{def1,def2,…}]
appends declarations to $CompilerEnvironment.
CompilerEnvironmentAppendTo[env,{def1,def2,…}]
appends declarations to CompilerEnvironmentObject env.


CompilerEnvironmentAppendTo
CompilerEnvironmentAppendTo[{def1,def2,…}]
appends declarations to $CompilerEnvironment.
CompilerEnvironmentAppendTo[env,{def1,def2,…}]
appends declarations to CompilerEnvironmentObject env.
Details

- CompilerEnvironmentAppendTo works with FunctionDeclaration to append function declarations to a CompilerEnvironmentObject.
- CompilerEnvironmentAppendTo works with TypeDeclaration to append function declarations to a CompilerEnvironmentObject.
- Declarations can be given with CompiledComponent objects.
Examples
Basic Examples (2)
Create a compiler environment and append a function declaration:
Use the new compiler environment in a compilation:
The compilation uses the function declaration:
Use CompilerEnvironmentAppendTo with the default compiler environment:
Now there is no need to use the CompilerEnvironment option:
The default compiler environment can be restored to its default state:
Tech Notes
Related Guides
History
Text
Wolfram Research (2021), CompilerEnvironmentAppendTo, Wolfram Language function, https://reference.wolfram.com/language/ref/CompilerEnvironmentAppendTo.html.
CMS
Wolfram Language. 2021. "CompilerEnvironmentAppendTo." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CompilerEnvironmentAppendTo.html.
APA
Wolfram Language. (2021). CompilerEnvironmentAppendTo. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CompilerEnvironmentAppendTo.html
BibTeX
@misc{reference.wolfram_2025_compilerenvironmentappendto, author="Wolfram Research", title="{CompilerEnvironmentAppendTo}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/CompilerEnvironmentAppendTo.html}", note=[Accessed: 13-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_compilerenvironmentappendto, organization={Wolfram Research}, title={CompilerEnvironmentAppendTo}, year={2021}, url={https://reference.wolfram.com/language/ref/CompilerEnvironmentAppendTo.html}, note=[Accessed: 13-August-2025]}