MathGroup Archive 2005

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

Search the Archive

usage messages in packages

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58064] usage messages in packages
  • From: Andrzej Kozlowski <andrzej at akikoz.net>
  • Date: Fri, 17 Jun 2005 05:19:44 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

One aspect of Mathematica packages that seems to me to be poorly  
designed is the way package usage messages can cover up a built in  
usage messages without any warning. A particularly irritating  
instance of this is when a package overloads the definition of a  
built in functions so that user receives no information at all about  
what happened. As an example compare:


?Normal

Normal[expr] converts expr to a normal expression, from a
variety of special forms.

load the Combinatorica package:


<<discretemath`combinatorica`


?Normal

Normal is a value that options VertexStyle, EdgeStyle, and \
PlotRange can take on in ShowGraph.

Another curious thing. Quit the Kernel and now try again loading the  
Combinatorica package in a different way

In[1]:=
<<discretemath`

This time the usage message was not covered up:

In[2]:=
?Normal

Normal[expr] converts expr to a normal expression, from a \
variety of special forms.

I had never realised that one could load directories of packages by  
using only small letters as in the above example until I saw Maxim  
doing it. This also works:

<< discretemath`combinatorica`


Actually, this is consistent with the documentation which says:


      <<dir` , initialize all packages from directory dir,
      <<dir`package` , read in a package from the named directory

but I had always assumed that "dir" and "package" actually meant  
"Dir" and "Package".


Andrzej Kozlowski
Chiba, Japan
http://www.akikoz.net/andrzej/index.html
http://www.mimuw.edu.pl/~akoz/



  • Prev by Date: Re: Problem defining assumptions on a set of variables
  • Next by Date: Re: field line with NDSolve
  • Previous by thread: Re: Problems with my first package: Statistics`Common`RegressionCommon`BestFitParameters instead of BestFitParameters
  • Next by thread: Re: usage messages in packages