help-gengetopt
[Top][All Lists]
Advanced

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

[help-gengetopt] multiple default values not possible it seems


From: Erik Sjölund
Subject: [help-gengetopt] multiple default values not possible it seems
Date: Fri, 04 Dec 2009 13:12:09 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Multiple default values are not supported it seems. If you for instance specify

option "weights" w "some text" typestr="FLOAT,FLOAT" float default="2.0,2.0" optional multiple(2)

I get "invalid default value".

I would be nice if that could be supported. If not I would suggest adding some more documentation, for instance like
the attached patch.

cheers,
Erik Sjölund


address@hidden:/tmp$ ~/gengetopt/inst/bin/gengetopt -V
GNU gengetopt 2.22.2
Copyright (C) 1999-2009  Free Software Foundation Inc.
This program comes with ABSOLUTELY NO WARRANTY; for details
please see the file 'COPYING' supplied with the source code.
This is free software, and you are welcome to redistribute it
under certain conditions; again, see 'COPYING' for details.
This program is released under the GNU General Public License.
address@hidden:/tmp$ cat a.ggo
package "reconcile"
version "0.9.0"
purpose "What this program does"
option "weights" w "some text" typestr="FLOAT,FLOAT" float default="2.0,2.0" optional multiple(2)

address@hidden:/tmp$ ~/gengetopt/inst/bin/gengetopt -i a.ggo
a.ggo:4: invalid default value
diff -ru old/gengetopt-2.22.3/doc/gengetopt.texinfo 
new/gengetopt-2.22.3/doc/gengetopt.texinfo
--- old/gengetopt-2.22.3/doc/gengetopt.texinfo  2009-09-30 18:56:16.000000000 
+0200
+++ new/gengetopt-2.22.3/doc/gengetopt.texinfo  2009-12-04 10:20:29.000000000 
+0100
@@ -504,8 +504,10 @@
 @cindex default 
 @item default 
 
-an optional default value for the option.  The value must always be
-specified as a double quoted string.
+an optional default value for the option. The value must always be
+specified as a double quoted string. It is possible to combine this 
+flag with the @code{multiple} flag but only by giving a single default 
+value. It is not possible to specify a list of default values.
 
 @cindex dependon
 @item dependon

reply via email to

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