PreviousUpNext

14.2.33  Process_Commandline

The standard library Process_Commandline api defines access to basic commandline parsing.

The Process_Commandline api is implemented by the process_commandline package.

The Process_Commandline api source code is in src/lib/src/process-commandline.api.

The above information is manually maintained and may contain errors.

api {   Nonleading_Options_Policy
        X
        = FREELY_INTERSPERSE_OPTIONS_AND_NONOPTIONS
        |
        NO_NONLEADING_OPTION_PROCESSING
        |
        TURN_NONOPTIONS_INTO_OPTIONS
        String -> X;
        Option_Argument
        X
        = OPTION_ARGUMENT_NONE
        Void -> X
        |
        OPTION_ARGUMENT_OPTIONAL
        {name:String, wrap:Null_Or(String ) -> X}
        |
        OPTION_ARGUMENT_REQUIRED
        {name:String, wrap:String -> X};
    Option_Definition X = {arg:Option_Argument(X ), help:String, long:List(String ), short:String};
    build_options_usage_string : {header:String, options:List(Option_Definition(X ) )} -> String;
        process_commandline :
                {error_callback:String -> Void, nonleading_options_policy:Nonleading_Options_Policy(X ),
                options:List(Option_Definition(X ) )}
            ->
            List(String ) -> (List(X ) , List(String ));};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext