Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Default value

  • To: mathgroup at
  • Subject: [mg74866] Re: Default value
  • From: jesse.woodroffe at
  • Date: Mon, 9 Apr 2007 06:11:46 -0400 (EDT)
  • References: <evabdq$dav$>

How about this replacement rule:


Here are the results:

   In[]:= f[x,y,z]
Out[]:= g[x,y,z]
   In[]:= f[x,y]
Out[]:= g[x,y,x]

Jesse Woodroffe

On Apr 8, 4:08 am, "Bruno Campanini" <B... at> wrote:
> I have a function   f [ i_, m_, iv_ ]  and would like
> to have a default value for iv equal to i.
> I neither can write   f [ i_, m_, iv_: i_ ], nor   f [ i_, m_, iv_ : i ]
> ans the error "Default value for iv_ contains a pattern" arises.
> Any workaround?
> Bruno

  • Prev by Date: Re: Default value
  • Next by Date: Infinity appears as a factor in Integrate result! 2
  • Previous by thread: Re: Default value
  • Next by thread: Re: Default value