MathGroup Archive 2010

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

Search the Archive

Proper style for argument checking?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg111937] Proper style for argument checking?
  • From: Yaroslav Bulatov <yaroslavvb at gmail.com>
  • Date: Fri, 20 Aug 2010 07:06:05 -0400 (EDT)

I have a function, and I'd like to do several checks on arguments
before evaluating it. If some check fails, I want the function to
return unevaluated and print corresponding error message, what's the
proper style of doing it?

Help for "Message" gives an example for a single check, but it seems
awkward to use same form for multiple checks.


  • Prev by Date: Re: "in-program" backup facility
  • Next by Date: Hanging indent in Print[] output?
  • Previous by thread: Re: There must be a better way.
  • Next by thread: Re: Proper style for argument checking?