$Context
是一个给出当前上下文的全局变量.
更多信息
- 上下文由 "name`" 形式的字符串指定.
- $Context 用 Begin、BeginPackage、End 和 EndPackage 修改.
- $Context 大致与许多操作系统中文件当前工作目录的 Wolfram 语言符号类似.
参见
Context $ContextPath CellContext $ContextAliases
Function Repository: ReplaceContext FullSymbolName
技术笔记
-
▪
- 上下文 ▪
- 建立 Wolfram 语言程序包
相关指南
-
▪
- 命名空间的管理
相关的工作流程
- 对不同的笔记本自动使用独立的上下文环境 (context) ▪
- 查找所有定义的函数 ▪
- 处理符号名称遮盖的问题
历史
1988年引入 (1.0)
文本
Wolfram Research (1988),$Context,Wolfram 语言函数,https://reference.wolfram.com/language/ref/$Context.html.
CMS
Wolfram 语言. 1988. "$Context." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/$Context.html.
APA
Wolfram 语言. (1988). $Context. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/$Context.html 年
BibTeX
@misc{reference.wolfram_2025_$context, author="Wolfram Research", title="{$Context}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/$Context.html}", note=[Accessed: 30-April-2026]}
BibLaTeX
@online{reference.wolfram_2025_$context, organization={Wolfram Research}, title={$Context}, year={1988}, url={https://reference.wolfram.com/language/ref/$Context.html}, note=[Accessed: 30-April-2026]}