Loading a package may result in “shadowed” symbols. Here is what to do about it.
Define a symbol or function
Define the symbol A1:
New symbols are created in the Global` context by default:
Load a package
Load the Music package. That package defines the symbol A1 in the Music` context, which shadows the previously defined symbol Global`A1:
Now A1 refers to the symbol in the Music` context:
The value of A1 in the Music` context differs from the value in the Global` context. The red coloring indicates that the Global`A1 symbol is shadowed:
The previously defined value of A1 can be accessed by specifying its context explicitly:
- “Shadowing” means that the same symbol occurs in more than one context on the context path, $ContextPath, making one or more symbols inaccessible unless you specify an explicit context. See the Contexts and Packages tech note for detailed information.
Resolve the shadowing
Remove the shadowed symbol to resolve the shadowing:
The A1 symbol is no longer colored red, indicating that it is no longer shadowing any other symbols: