Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2000
*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 2000

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

Search the Archive

Re: Default values / optional parameters

  • To: mathgroup at smc.vnet.net
  • Subject: [mg22074] Re: Default values / optional parameters
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Sat, 12 Feb 2000 04:04:32 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <880g4a$4so@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

why not to use the FullForm[

Optional[somepattern,somevalue]

?

Regards
  Jens

Hermann Klocker wrote:
> 
> [Contact the author to obtain the notebook mentioned - moderator]
> 
> The sample notebook shows how two functions defined in a very similar
> manner behave differently when using optional parameters. Question: How
> can I define a function whose optional parameter is a pattern requiring
> a specific head and has a given default value? Help says this is x_h:v
> but my example says that this does not work in some cases.
> 
> ________________________________________________
> Dr. Hermann Klocker   Phone/Fax: +43-5672-65724
>                       Mobile: +43-676-480 57 67
> Gymnasiumstrasse 5/5, A-6600 Reutte, AUSTRIA
> mailto:h.klocker at tirol.com
> http://www.ausserfern.at/klocker
> ________________________________________________


  • Prev by Date: Re: Simplifying expressions for use in C programs
  • Next by Date: Re: Finding parts of Equations...
  • Previous by thread: Re: Default values / optional parameters
  • Next by thread: Mathlink and packed arrays