up: ARG | index | Zimbu documentation |
A Flag that has no argument, it's presence is noted. For example, with this flag: ARG.Bool verbose = NEW("v", "verbose", FALSE, "verbose messages")These arguments can be used: prog --verbose prog --noverbose prog -v prog -vvv prog --verbose=yes When the flag is present the value becomes the inversion of the default value. The value can be set to TRUE with "--verbose=yes" and "--verbose=true". The value can be set to FALSE with "--verbose=no" and "--verbose=false" and "--noverbose". "--noverbose" only works as "--verbose=no" when there is no flag called "noverbose". By default the flag is allowed to be used more than once, use presentCount() to obtain the number of times. Use disableRepeat() to disable this. Using the argument: IF verbose.get() IO.print("verbose output") IF verbose.presentCount() >= 3 IO.print("VERY verbose") } }
|
PROC NEW(string shortName, string longName, bool default, string doc) @public
FUNC $disableRepeat() ARG.Bool @public
|
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 |