MathGroup Archive 2001

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

Search the Archive

Re: Functions with Options


Guillerm.
You need max_ instead of max, and ___ (three underscores) instead of __ (two
underscores) to allow for no options being used.

--
Allan

---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565


<guillerm at usal.es> wrote in message news:9vdsg5$540$1 at smc.vnet.net...
> I would like build functions with Options calling Mathematica functions
with
> the same options.
>
> Here is a naïf example
>
> newPlot[f_, {x_, min_, max}, opts__] := Plot[f, {x, min, max}, opts]
>
> But it doesn`t work.
>
> newPlot[Sin[x], {x, 0 , 2 Pi}, Axes -> False, AspectRatio -> Automatic]
>
> newPlot[Sin[x], {x, 0 , 2 Pi}]
>
>
> Any
> help?
>
> ---------------------------------------------
> This message was sent using Endymion MailMan.
> http://www.endymion.com/products/mailman/
>




  • Prev by Date: Re: restrictions on parameters
  • Next by Date: RE: Functions with Options
  • Previous by thread: Functions with Options
  • Next by thread: RE: Functions with Options