CompilerInformation
更多信息和选项
- 对于函数输入,可将 fun 封装在 Typed 中,用模式来选择特定的结果.
- 对于函数或类型,可使用模式来显示多个结果.
- 可以给出以下选项:
-
CompilerEnvironment $CompilerEnvironment 用于信息的编译器环境 - 对于函数输入,可以给出以下属性:
-
"ObjectType" 信息类别 "Name" 函数名称 "Declarations" 此函数的声明 - 对于类型输入,可以给出以下属性:
-
"ObjectType" 信息类别 "TypeVariables" 类型的变量 "AbstractTypes" 此类型实现的抽象类型 "Fields" 可声明的字段 "Operations" 可声明的操作
范例
打开所有单元 关闭所有单元基本范例 (5)
返回编译器已知的函数 Dimensions 的信息:
CompilerInformation[Dimensions]CompilerInformation["Integer64"]CompilerInformation["Integer64"]CompilerInformation 可以返回编译器环境已知的所有信息. 通常,这些信息量相当大:
CompilerInformation[]这些是 Dimensions 已知的声明:
CompilerInformation[Dimensions]["Declarations"]CompilerInformation["Integer64"]["AbstractTypes"]CompilerInformation["HashTable"]["Fields"]CompilerInformation[ToRawPointer]将 Typed 与模式一起使用来缩小搜索范围,例如,查看所有接受 "CArray" 作为第一个参数的版本:
CompilerInformation[Typed[ToRawPointer, {"CArray"::[_], __} -> _]]范围 (2)
选项 (1)
CompilerEnvironment (1)
env = CreateCompilerEnvironment[];
CompilerEnvironmentAppendTo[env, FunctionDeclaration[myFun, Typed[{"Integer64"} -> "Integer64"]@Function[{arg}, arg + 1]]];CompilerInformation[myFun, CompilerEnvironment -> env]技术笔记
文本
Wolfram Research (2024),CompilerInformation,Wolfram 语言函数,https://reference.wolfram.com/language/ref/CompilerInformation.html (更新于 2026 年).
CMS
Wolfram 语言. 2024. "CompilerInformation." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2026. https://reference.wolfram.com/language/ref/CompilerInformation.html.
APA
Wolfram 语言. (2024). CompilerInformation. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/CompilerInformation.html 年
BibTeX
@misc{reference.wolfram_2026_compilerinformation, author="Wolfram Research", title="{CompilerInformation}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/CompilerInformation.html}", note=[Accessed: 07-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_compilerinformation, organization={Wolfram Research}, title={CompilerInformation}, year={2026}, url={https://reference.wolfram.com/language/ref/CompilerInformation.html}, note=[Accessed: 07-September-2026]}