MathGroup Archive 1998

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

Search the Archive

Re: loading packages-followup

  • To: mathgroup at
  • Subject: [mg14394] Re: loading packages-followup
  • From: "P.J. Hinton" <paulh>
  • Date: Sun, 18 Oct 1998 15:10:00 -0400
  • Organization: "Wolfram Research, Inc."
  • References: <703vqk$>
  • Sender: owner-wri-mathgroup at

On 15 Oct 1998 sean_ross_at_pl-04m3 at wrote:

>      This is in response to my earlier question about why packages I
> wrote 
>      wouldn't load.  The answer is that code written in the 3.0.1
> FrontEnd 
>      and Saved As Special:Package Format is commented out in the save 
>      routine, thus all packages written in the front end and saved in
> what 
>      appears to be the intended manner have an extra (* at the front of
> the 
>      file and an extra *) at the end, effectively disabling the code. 
> If 
>      you remove these in a text editor, the package can be read in and 
>      everything loads just fine.  I now have two more questions related
> to 
>      this.
>      1) is this placing of extra (* and *) in packages by the 
>      SaveAsSpecial:Package Format a "feature" or a "bug"?

The Save As Special -> Package Format command exports the contents of
cells which have the InitializationCell option set to True.  Contents of
cells that do not meet this criterion will be commented out.
>      2) The kernel knows to search the \ProgrammingInMathematica and the
>      \Utilities subdirectories of the ExtraPackages folder.  If I put my
>      own subdirectory in the ExtraPackages folder, the Kernel does not 
>      search there.  Why?  I got around it by appending the path to the 
>      $Path variable in the init.m, but I am still curious as to how the 
>      Kernel knew it was supposed to search only those two subdirectories
>      but wouldn't search mine even though none of them was listed 
>      explicitly in the $Path.

Are you loading the package with a context name that reflects the
relative path from a directory on $Path?  For example, in order to load
the packages in the ExtraPackages directory, you have to issue commands


because ExtraPackages is on $Path, but the ProgrammingInMathematica
subdirectory is not.

P.J. Hinton
Mathematica Programming Group           paulh at Wolfram
Research, Inc.        
Disclaimer: Opinions expressed herein are those of the author alone.

  • Prev by Date: Re: Routines inside Epilog
  • Next by Date: Re: Adding equations
  • Previous by thread: loading packages-followup
  • Next by thread: Re: loading packages-followup