Webel IT Australia promotes the amazing Mathematica tool and the powerful Wolfram Language and offers professional Mathematica services for computational computing and data analysis. Our Mathematica tips, issue tracking, and wishlist is offered here most constructively to help improve the tool and language and support the Mathematica user community.
DISCLAIMER: Wolfram Research does not officially endorse analysis by Webel IT Australia.
There is no pre-defined function for finding which contexts a symbol is defined in, but you can use the following to iterate over all known contexts and find the value of a symbol without creating any new symbols in the contexts tested:
Typical result for a
valueInAllContexts[symbol_] := Symbol /@ Names[# <> ToString[symbol] & /@ $ContextPath];
varknown globally and in two contexts:
Above, the var is known in each context but does not have values. If it has a value
valBin, say, one of the contexts