MathGroup Archive 1995

[Date Index] [Thread Index] [Author Index]

Search the Archive

Context confusion

  • To: mathgroup at
  • Subject: [mg1530] Context confusion
  • From: REECE_D <REECE+_D%A1%Electromagnetic_Sciences at>
  • Date: Wed, 21 Jun 1995 23:24:18 -0400

   Back to my context confusion question.  I think it is behaving like I 
originally thought so my question still exists.  Maybe someone can read 
this example and explain why I am confused:
   BeginPackage["Thermal`", "Packages`Miscellaneous`Units`",
   "Packages`Miscellaneous`SIUnits`", "Global`"];
      Warning:Context Packages`Miscellaneous`Units`
        was not created when Needs was evaluated.
      Warning:Context Packages`Miscellaneous`SIUnits`
        was not created when Needs was evaluated.
   Options[Grashof] = {Temperature->300 Kelvin}
      Warning: Symbol Kelvin appears in multiple contexts 
       {Thermal`, Miscellaneous`SIUnits`}; definitions in
        context Thermal` may shadow or be shadowed by other
   According to Maeder's Book(p.31) "When Mathematica encounters a symbol 
in the input that you type or that is read from a file, it searches the 
current context and then all the contexts on the context path for this 
symbol."  Why then does MMA create 2 versions of Kelvin when both contexts 
are on the $ContextPath?
   Related question, how do I leave SIUnits off of the explicit calls but 
have it appear in the $ContextPath as a result of the call to Units?
   I am really confused over something I thought I understood somewhat.
   Thanks in advance,

  • Prev by Date: How to create a legend for combined Listplots ?
  • Next by Date: Re: A/S Wavefunction calcs: more
  • Previous by thread: Re: How to create a legend for combined Listplots ?
  • Next by thread: Re: Context confusion