MathGroup Archive 1996

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

Search the Archive

Re: Context Names Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg3963] Re: Context Names Question
  • From: wagner at motel6.cs.colorado.edu (Dave Wagner)
  • Date: Mon, 13 May 1996 01:46:23 -0400
  • Organization: University of Colorado, Boulder
  • Sender: owner-wri-mathgroup at wolfram.com

In article <4menil$jva at dragonfly.wolfram.com>, Xah Lee  <xah at best.com> wrote:
>A context name related problem.
>
>Suppose I have two packages, TrochoidPlot and TrochoidShow for example. 
>Both packages use the option name RotationRange for several of their 
>functions.
>
>Shadowing of RotationRange will occure after loading the second package. 
>Is there some code one can execute before or after loading so the option 
>RotationRange can be recognized in functions from either package?

You can declare a subsidiary package, say, TrochoidCommon,
that defines RotationRange.  Then change the BeginPackage
statement in TrochoidPlot to this:

	BeginPackage[TrochoidPlot`, TrochoidCommon`];

The second argument to BeginPackage causes TrochoidCommon to load
whenever TrochoidPlot is loaded.  Similarly for TrochoidShow.

Since these packages are obviously tightly integrated, I suggest that
you change your naming scheme to:  Trochoid`Plot`, Trochoid`Show`, and
Trochoid`Common`.  That way, everything lives in one directory.
The standard Statistics packages are structured in this way.
Check them out for examples.

		Dave Wagner
		Principia Consulting
		(303) 786-8371
		dbwagner at princon.com
		http://www.princon.com/princon

==== [MESSAGE SEPARATOR] ====


  • Prev by Date: Re: multinomials: a programming question
  • Next by Date: Problem: Table[{v,Part[T[v],1]},{v,0.001,vcc,0.1}]
  • Previous by thread: Re: Context Names Question
  • Next by thread: Re: Context Names Question