From 8fa74cde8899472d3b415727554d00e3bf387840 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 26 Aug 2013 01:49:52 +0200 Subject: issue 2, info manual MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- info/argparser.texinfo | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'info') diff --git a/info/argparser.texinfo b/info/argparser.texinfo index 253c3bb..5c04b18 100644 --- a/info/argparser.texinfo +++ b/info/argparser.texinfo @@ -56,6 +56,7 @@ Texts. A copy of the license is included in the section entitled * C version:: Using the C version. * Bash version:: Using the Bash version. * Trigger functions:: Trigger events at the time an option is parsed. +* Optional arguments:: Using optional arguments. * Colours in help message:: Configuring colour use in help message * GNU Free Documentation License:: Copying and sharing this manual. @end menu @@ -345,6 +346,31 @@ alternative. +@node Optional arguments +@chapter Optional arguments + +Optionally argumented options work like argumented options. +They are named @code{Optargumented} options the Java version +and @code{optargumented} in the other version. The differense +from argumented options are that the argument must be sticky, +that is, not separated to another command line argument, +unless its @code{stickless} method returns true. The default +behaviour is that the @code{stickless} method returns true +if and only if the argument does not start with @code{-} +nor @code{+}. + +The stickless method is the last argument in the Python +version, the first argument in the Bash version as well as +in the C version (and returns a @code{long int}). The the +Java version it is definied by reimplementing it when +creating a subclass to @code{Optargumented}. The stickless +method only has one parameter, the argument that is being +tested for using without being sticky. + + + + + @node Colours in help message @chapter Colours in help message -- cgit v1.2.3-70-g09d2