[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-gengetopt] Gengetopt 2.21 enhancement suggestions
From: |
Andre Noll |
Subject: |
Re: [help-gengetopt] Gengetopt 2.21 enhancement suggestions |
Date: |
Mon, 15 Oct 2007 17:54:00 +0200 |
User-agent: |
Mutt/1.5.9i |
On 17:35, Lorenzo Bettini wrote:
> >>of course range makes sense only for integers right?
> >
> >It would also make sense for floats. And it would be nice to also have
> >"infinite" intervals, i.e. something like "int range=0.." meaning
> >the given integer value must not be negative.
> >
>
> anyway, only for numerical values, right?
<mathematician hat on> For all type of options such that the
underlying set carries a canonical partial order <mathematician
hat off>.
This includes strings as well:
string range="bar..baz"
means that the given string must be between "bar" and "baz" in
the lexicographical order.
Note that the "right" lexicographical order depends on the current
locale which is probably a bit strange. As a locale-independent
variant, one could use
strcmp("bar", arg) <= 0 && strcmp(arg, "baz") <= 0
to test whether arg is valid.
However, I'm not sure at all if the range thing is really useful for
non-numerical values.
Andre
--
The only person who always got his work done by Friday was Robinson Crusoe
signature.asc
Description: Digital signature
Re: [help-gengetopt] Gengetopt 2.21 enhancement suggestions, Lorenzo Bettini, 2007/10/15
- [help-gengetopt] Re: Gengetopt 2.21 enhancement suggestions, J. David Bryan, 2007/10/15
- Re: [help-gengetopt] Re: Gengetopt 2.21 enhancement suggestions, Lorenzo Bettini, 2007/10/17
- Re: [help-gengetopt] Re: Gengetopt 2.21 enhancement suggestions, J. David Bryan, 2007/10/17
- Re: [help-gengetopt] Re: Gengetopt 2.21 enhancement suggestions, Lorenzo Bettini, 2007/10/17
- Re: [help-gengetopt] Re: Gengetopt 2.21 enhancement suggestions, J. David Bryan, 2007/10/17
- Re: [help-gengetopt] Re: Gengetopt 2.21 enhancement suggestions, Lorenzo Bettini, 2007/10/18
- Re: [help-gengetopt] Re: Gengetopt 2.21 enhancement suggestions, J. David Bryan, 2007/10/18
Re: [help-gengetopt] Re: Gengetopt 2.21 enhancement suggestions, Gyozo Papp, 2007/10/17