|
[Date Index]
[Thread Index]
[Author Index]
Re: Length of actual parameters in a function call.
- To: mathgroup at smc.vnet.net
- Subject: [mg47498] Re: Length of actual parameters in a function call.
- From: Torben Winther Graversen <immtwg at bohr.gbar.dtu.dk>
- Date: Wed, 14 Apr 2004 07:16:56 -0400 (EDT)
- Organization: UNI-C
- References: <c3udpe$9om$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
E. Martin-Serrano <eMartinSerrano at houston.rr.com> wrote:
: Hi,
: A few weeks ago, reviewing some tutorials on pattern matching and error
: handling, I came across an undocumented function to monitor the number of
: parameters submitted to a function in a call; but somehow I lost its track
: later. I guess that it must be something well-known by our specialists. Any
: help about where to locate it?
: The undocumented feature helps in tracking situations as when we define
: "MyFunction[a_,b_,c_]:= something" and then it is called as "myFunction[a]"
: leaving the function unevaluated.
Hi,
Perhaps the one you are looking for is ArgumentCountQ ?
I stumbled on it a few days ago on Ted Ersek's Tricks page:
http://www.verbeia.com/mathematica/tips/HTMLLinks/Tricks_210.html
The documentation on Wolfram's site is at:
http://support.wolfram.com/mathematica/kernel/Symbols/System/ArgumentCountQ.html
ArgumentCountQ[head,len,min,max] tests whether the number len of
arguments of a function head is between min and max.
Regards,
Torben
Prev by Date:
Re: Partitioning a list into unequal partitions
Next by Date:
Re: Question: ABS and \[Prime]
Previous by thread:
Re: Solvability sensitive to small changes in numerical input
Next by thread:
Feynman
|