Page
Library
Module
Module type
Parameter
Class
Class type
Source
Minicli.CLI
SourceSys.argv as a list
all accepted strings meaning the same option
Call init
before using any of the other funtions (unless you really know what you are doing). let argc, args = CLI.init () in ...
will compute argc
and transform Sys.argv into the string list args
.
You can (but you are not forced to) call finalize
in case options parsing is finished. Meaning, the program will not try to process command line options anymore. finalize
will enforce that there are no unused options left on the command line. In case there are some options left unused on the command line, finalize
will raise an Unused_options
exception listing them all.
read a mandatory int from the command line
read a mandatory char from the command line
read a mandatory string from the command line
read a mandatory float from the command line
undocumented
return true if flag was present on the command line, false otherwise
return false if flag was present on the command line, true otherwise
read an optional int from the command line
read an optional char from the command line
read an optional string from the command line
read an optional float from the command line
undocumented
read an optional int from the command line, or use the provided default if option was not seen on the command line
read an optional string from the command line, or use the provided default if option was not seen on the command line
read an optional char from the command line, or use the provided default if option was not seen on the command line
read an optional float from the command line, or use the provided default if option was not seen on the command line
undocumented