up: ARG     index Zimbu documentation

CLASS ARG.StringList EXTENDS ARG.Flag @public

summary

     

A Flag that includes all following arguments.

The argument values are available as a list of strings.

For example, with this flag:

 ARG.StringList args = NEW("a", "args", [], "the list of arguments")
These arguments can be used:
 prog --args one -two three
 prog -a one -two three

And will result in ["one", "-two", "three"].

The flag cannot be used more than once, because it consumes all the remaining arguments.

NEW(shortName, longName, default, doc) @public  Create a Flag that is followed by any number of arguments.
$get() list<string> @public  Return the value.
$value() list<string> @public  Return the value.
 
Inherited from ARG.Flag:
$setArgName(argName) ARG.Flag @public  Set the text used in the --help output for the argument.
$disableCompact() ARG.Flag @public  Disable the compact form of flag values.
$optionalArg() ARG.Flag @public  Make the flag argument optional.
$presentCount() int @public  Return the number of times the command line flag was encountered.
$present() bool @public  Return TRUE if the command line flag was encountered.
 

members (alphabetically)

     

PROC NEW(string shortName, string longName, list<string> default, string doc) @public

     

Create a Flag that is followed by any number of arguments.

shortName is the one-character name, can be NIL.

longName is the longer name, to be used after "--", can be NIL

shortName and longName can't both be NIL.

default is the default value, used when the flag is not present.

doc is displayed for this flag with the --help argument.

FUNC $get() list<string> @public

     

Return the value.

When the flag was not encountered it will be the specified default.

Can only be used after EarlyInit(), when ARG.Ready is TRUE.

FUNC $value() list<string> @public

     

Return the value.

When the flag was not encountered it will be the specified default.

Can only be used after EarlyInit(), when ARG.Ready is TRUE.

license

      Copyright 2009 Bram Moolenaar All Rights Reserved.

      Licensed under the Apache License, Version 2.0. See the LICENSE file or obtain a copy at: http://www.apache.org/licenses/LICENSE-2.0