The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: suppressing initialization
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Frank Beatrous

Posts: 2
Registered: 12/7/04
suppressing initialization
Posted: Jul 28, 1996 11:24 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I would like to find a clean way to suppress the loading of a package
that's defined in initialization cells of notebooks when the package is
already loaded at the time the notebook is initialized. The "obvious"
thing to do is to put code something like this in the initialization:

x::usage="This should go in the context mystuff`.";
x = a;
y = b;

Unfortunately, the symbols x and y both land in the Global`
context instead of mystuff` and mystuff`Private` where they
belong. Evidently, the code inside of If[] uses its own local
version of $Context, rather than the global one that's
manipulated by BeginPackage[] and Begin[].

I know that I could use Needs[] if I put the package definitions
ins a separate file, but that won't do, since I want the
notebooks to work on computers that may not have the package
files installed. Any suggestions?

Frank Beatrous

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.