Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: User defined options shared by more than one function - potential

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90792] Re: User defined options shared by more than one function - potential
  • From: "David Park" <djmpark at comcast.net>
  • Date: Thu, 24 Jul 2008 04:53:55 -0400 (EDT)
  • References: <g670of$s4u$1@smc.vnet.net>

Write usage messages in the public section of the package for opt1 and opt2.

Use different option names in different packages. That is, make the option 
name specific to the function, or at least to the package.

-- 
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/


"Donald DuBois" <donabc at comcast.net> wrote in message 
news:g670of$s4u$1 at smc.vnet.net...
> Are there any compelling reasons for placing the
> statement
>
> Options[functionName] -> {opt1->"", opt2->""}
>
> in the public or private section of
> a user defined Mathematica package?
>
> If there is more than one function that has the same
> option name then, to get rid of the option name
> showing up in red letters (because the option has been defined
> in multiple contexts when the functions are in different packages) then 
> having the options defined in the private
> section of a package gets rid of this problem (i.e. the problem of having 
> the option name, when used while calling a function,  show up in red 
> letters).
>
> Would it still be possible to have a usage statement for an option (to 
> document its meaning) in the public section of a package, even though it 
> is defined with the Option statement above in the private section?
>
> Thank you.
>
> Don
> 



  • Prev by Date: Re: Interval arithmetic bug
  • Next by Date: Suggestions for selling a copy of Mathematica V6 wanted
  • Previous by thread: Re: User defined options shared by more than one function - potential
  • Next by thread: Running programs from the command line in Mathematica