help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get all arguments to a call function


From: Michael Stahl
Subject: Re: How to get all arguments to a call function
Date: Wed, 18 May 2011 10:27:09 +0200
User-agent: Thunderbird 2.0.0.23 (X11/20090910)

On 17/05/2011 17:00, Peng Yu wrote:
> Hi,
> 
> According to "8.6 The call Function" of the manual, I can use $(1) to
> get a particular argument. But what if I want to get all the
> arguments, or the 2nd, 3rd,..and so on arguments. Are there special
> variables for these?

the 2nd etc. argument is just $(2), $(3) and so on.
AFAIK there is no way to get _all_ arguments except explicitly enumerating
them:
$(1) $(2) $(3) $(4) $(5) $(6) $(7) $(8) $(9)

of course if somebody calls this with ten arguments the last one will get
lost, but personally i haven't ever needed so many arguments...

if you just have several things that are of the same "kind" to pass into a
function, try to pass it as a single argument that is a space-separated list.

-- 
"To iterate is human; to recurse, divine." -- L. Peter Deutsch




reply via email to

[Prev in Thread] Current Thread [Next in Thread]