MathGroup Archive 2009

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

Search the Archive

Re: Default Symbol Names in Package Functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg96156] Re: Default Symbol Names in Package Functions
  • From: magma <maderri2 at gmail.com>
  • Date: Sat, 7 Feb 2009 03:51:36 -0500 (EST)
  • References: <gmec67$a8j$1@smc.vnet.net>

In a way , I think Mathematica obliges the developer to use more foolproof
programming.
This is what I mean:
Your symbol x is a special (default) value for a function (foo) that
only makes sense if you load testpackage. So very likely also x makes
sense only if you load testpackage (and perhaps some other accessory
package).
So x shouldn't be a Global symbol anyway (in most likely situations).
In other words: x , like foo, should be defined in testpackage.
So add

x::usage=.....

But if x is defined in some other AuxPackage or is really something
very general whch is defined in the Global context, then include this
other package or the Global context in the context path, using the
approrpiate BeginPackage[.....] declaration. Something like:

BeginPackage["context`",{"Global`","AuxPackage`",...}]

hth


  • Prev by Date: Re: FindFit & NIntegrate
  • Next by Date: Re: Options for Eigenvalues
  • Previous by thread: Re: Default Symbol Names in Package Functions
  • Next by thread: Re: Default Symbol Names in Package Functions