Questions tagged [contexts]
Questions about contexts, which are used in Mathematica to organize defined symbols and avoid conflict between symbols that would otherwise have the same name. They are created when packages are loaded.
221 questions
4 votes
1 answer
232 views
Strange autoloading behaviour of the Developer` package
While playing around with the Developer` package, I encountered what I think is strange behaviour. Using a fresh kernel, I get the following expected results: ...
4 votes
1 answer
239 views
Pollution in context added by BeginPackage remains even after Exit
Tested in $Version (* "14.3.0 for Microsoft Windows (64-bit) (July 8, 2025)" *) The issue can be reproduced in the following manner. First, execute the ...
6 votes
1 answer
302 views
Context["x"] returns different result in documentation and notebook
In help it says (under scope) Notice it gives context of x as cell. But when I do the same in my notebook, running V 14.3 on Linux, it gives ...
0 votes
0 answers
107 views
Mathematica package: How to make results of a calculation accessible while keeping intermediate results private [duplicate]
I want to write a Mathematica package which on being loaded, performs some calculations such as ...
1 vote
0 answers
71 views
Problem defining Function inside Module to verify ODE solution [duplicate]
I modified the question. It turns out this problem has nothing to do with using a package. New style or standard style./ Same problem shows in a normal module in notebook. This is the most bizzar ...
4 votes
2 answers
318 views
How to keep private package function private when adding package name to function name inside the package?
I like to call my package private functions using mypkg`functionName[...] i.e. add an explicit mypkg to each call. This ...
0 votes
0 answers
53 views
0 votes
1 answer
244 views
How do contexts work exactly? Is there anything special about Private` or Internal` context?
Suppose I begin a package: BeginPackage["MyPackage`"]; Before running this command in a fresh kernel, the context and path were: ...