[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] \$[m-n] \$[m-] \$[-n]
From: |
Werner LEMBERG |
Subject: |
Re: [Groff] \$[m-n] \$[m-] \$[-n] |
Date: |
Fri, 06 May 2011 09:20:03 +0200 (CEST) |
Sorry for the late reply.
> Wouldn't it be useful to have parameters like \$[m-n] that pick out
> the parameters \$m through \$n ?
>
> Right now, a macro's body can use \$1 ... \$n, and \$*, and \$@, and
> then call .shift howsoever many times to get the right "slice".
> However, a similar ability isn't available for string definitions
> (with .ds). \$[m-n] (and perhaps also \$[m-] and \$[-n] where one
> end of the range is not specified) would ameliorate this lack.
I'm not sure that it would help a lot. Normally, you have to
manipulate the argument indices before accessing the arguments based
on some condition, and within strings this is not possible.
To better judge the whole issue please provide a sample where such
functionality would be useful.
Werner