4

I am trying to understand Mathematica's Context, but I do not understand why the short name of the variable defined in the temp` context (x) returns the Global definition. I am following the section on Context given in "Power Programming with Mathematica…"

x=5  
temp`x=6;
{x,temp`x}
Begin["temp`"]
{x,Global`x}
{temp`x,Global`x}
End[]

(* 5

{5,6}

temp`

{5,5}

{6,5} *)

tarhawk
  • 769
  • 5
  • 15

0 Answers0