MathGroup Archive 1996

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

Search the Archive

Re: Context Names Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg3984] Re: [mg3919] Context Names Question
  • From: xah at best.com (Xah Lee)
  • Date: Tue, 14 May 1996 02:11:45 -0400
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Allan,

I followed your suggestion of moving the option name to the System context
and it worked.
Thanks for the help on the shadowing problem.


 Xah
 xah at best.com; 74631.731 at compuserve.com
 http://www.best.com/~xah/
 Mountain View, CA, USA

----------------------------------------------

At 10:34 AM 96/5/7, Allan Hayes wrote:
>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: Question
  • Next by Date: movies
  • Previous by thread: Re: Context Names Question
  • Next by thread: how to draw the contour lines on a surface