Begin
Begin["context`"]
現行のコンテキストを設定する.
例題
すべて開く すべて閉じる例 (1)
MyContext` Contextで関数fを定義する:

アプリケーション (1)
コンフリクトを避けるため,パッケージ関数の定義をプライベートにしてシンボルを作る:
パッケージコンテキストでシンボルfを使用するとfは必ずそのコンテキストで作られる:
Beginに与えられたコンテキストが「`」で始まる場合は現行コンテキストから拡張される:
シンボルfはパッケージコンテキストにあるので,関数はEndPackageの後でも作用する:
特性と関係 (3)
Begin["cont`"]は$Contextを"cont`"に設定する:
Endは$ContextをマッチするBeginの前の値に戻す:
BeginはBeginPackageとは違って$ContextPathに変更を加えない:
同様に,Endもこれを変更しない:
Beginは$ContextAliasesの値を変更しない:
Endは$ContextAliasesをマッチするBeginの前の値に戻す:
関連項目
End BeginPackage EndPackage $ContextPath Context $ContextAliases CellContext
Function Repository: ContextDependencies
テクニカルノート
-
▪
- Wolfram言語パッケージ ▪
- パッケージ
関連するワークフロー
- シンボル名のシャドーイングに対処する
履歴
1988 で導入 (1.0)
テキスト
Wolfram Research (1988), Begin, Wolfram言語関数, https://reference.wolfram.com/language/ref/Begin.html.
CMS
Wolfram Language. 1988. "Begin." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Begin.html.
APA
Wolfram Language. (1988). Begin. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Begin.html
BibTeX
@misc{reference.wolfram_2025_begin, author="Wolfram Research", title="{Begin}", year="1988", howpublished="\url{https://reference.wolfram.com/language/ref/Begin.html}", note=[Accessed: 28-September-2025]}
BibLaTeX
@online{reference.wolfram_2025_begin, organization={Wolfram Research}, title={Begin}, year={1988}, url={https://reference.wolfram.com/language/ref/Begin.html}, note=[Accessed: 28-September-2025]}