Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1996
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1996

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

Search the Archive

Re: Context Names Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg3973] Re: [mg3919] Context Names Question
  • From: Allan Hayes <hay at haystack.demon.co.uk>
  • Date: Mon, 13 May 1996 01:48:09 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Xah Lee <xah at best.com>
in [mg3919] Context Names Question
writes

> 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 occur 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?

Xah:

A simple solution is to create the option RotationRange in the  
System context, usually in your usage messages for the packages:

System`RotationRange::usage = "RotationRange is an option for the  
packages TrochoidPlot and TrochoidShow ...."

You may prefer different wording, for example a general form like  
"RotationRange is an option for several packages ..."

With more code you can arrange for the usage messages for several  
packages to cummulatively add their information to that already  
stored on the option.

Example:
	BeginPackage["Xah1`"];
	System`opt::usage = "Message 1";
	EndPackage[];
	
	?opt
		Message 1

	BeginPackage["Xah2`"];
	System`opt::usage = "Message 2";
	EndPackage[];
	
	?opt
		Message 2

Allan Hayes
hay at haystack.demon.couk

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


  • Prev by Date: Re: Whole numbers only on x-axis?
  • Next by Date: Re: list
  • Previous by thread: Context Names Question
  • Next by thread: Re: Context Names Question