Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*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 2005

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

Search the Archive

Re: Validating functions input

  • To: mathgroup at smc.vnet.net
  • Subject: [mg58806] Re: Validating functions input
  • From: "dkr" <dkrjeg at adelphia.net>
  • Date: Tue, 19 Jul 2005 04:10:16 -0400 (EDT)
  • References: <dbflkk$n0p$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In[11]:=
f::invalid = "Invalid arguments" ;

f[x_,y_]:=Message[f::invalid]/;x>2^y;

f[x_,y_]:=HoldForm[f[x,y]];

In[14]:=f[2,3]

Out[14]=f[2,3]

In[15]:=f[8,2]

f::invalid: Invalid arguments


  • Prev by Date: Re: Validating functions input
  • Next by Date: Re: Directed Graph from Adjacency Matrix
  • Previous by thread: Re: Validating functions input
  • Next by thread: Re: Validating functions input