Some questions related to $Context
and $ContextPath
have already been asked and answered, but I still cannot fully grasp the concept. Evaluating
CompoundExpression[Begin["Ctx1`"], x = 1, End[], {Ctx1`x, x}]
in a pristine kernel yields {Ctx1`x, 1}
. However, evaluating each level 1 statement in turn in a pristine kernel results in {1, x}
. If this behaviour complies with the design, where is it documented?
CompoundExpression[Print[$Context], Begin["Ctx1`"], Print[$Context], x = 1, End[], Print[$Context], {Ctx1`x, x}]
$\endgroup$x
. $\endgroup$tutorial/ModularityAndTheNamingOfThings#5934
about "Setting Up Wolfram Language Packages". The question is resolved. $\endgroup$