MathGroup Archive 2003

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

Search the Archive

Re: Options for my own Packages?

  • To: mathgroup at
  • Subject: [mg44219] Re: Options for my own Packages?
  • From: Jens-Peer Kuska <kuska at>
  • Date: Wed, 29 Oct 2003 03:34:03 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <bnlidb$p92$>
  • Reply-to: kuska at
  • Sender: owner-wri-mathgroup at


define the default options with

Options[curveGrid]={name->value, name2->value2}

  Module[{thisname,  thisname2},
   {thisname,thisname2}={name,name2} /. {opts} /. Options[curveGrid];


"Steven T. Hatton" wrote:
> Can I create and use options in my own packages?  I've seen comments in the
> help documentation that say "built-in functions" have options.  Here's an
> example of what I want.  I created a class called curveGrid, which has data
> and methods for generating a coordinate grid defined by a mapping function
> passed to the constructor.  I would like to be able to set an option that
> changed the default color of all instances of this class.
> Is there a way to accomplish this so that I can do something like
> SetOptions[curveGrid,name->value, name2->value2...]?
> --
> "Philosophy is written in this grand book, The Universe. ... But the book
> cannot be understood unless one first learns to comprehend the language...
> in which it is written. It is written in the language of mathematics, ...;
> without which wanders about in a dark labyrinth."   The Lion of Gaul

  • Prev by Date: Re: Offending 2D-Axes
  • Next by Date: Re: serious NDSolve bug?
  • Previous by thread: Options for my own Packages?
  • Next by thread: RE: Options for my own Packages?