On Sun, 11 Mar 2007 19:52:41 +0100, Colin Adams
<col...@ho...> wrote:
>> From reading the documentation, it seems that the parser can not check
>> the
> number of parameters passed.
>
> It seems to me that it would be convenient to be able to set the minimum
> and
> maximum number of parameters expected, which would then reduce the
> checking
> the application had to do.
>
> As the number expected might differ according to the option set, then
> this
> should be settable at the option list level (as well as on the parser,
> if it
> is the same for all (or most) option sets).
>
> What do you think?
I had already experimented with such a features, but had not full decided
for a satisfactory design. Currently I only differenciate between
mandatory or not mandatory.
Giving the maximum number of occurencies seems very reasonable. With
minimum: It seems very rare that an option is required 'at least 3 times'.
But I might be wrong here. I will probably extend the mandatory mechanism
to cover such cases.
Bernd
|