val parse : argspec list -> (string -> unit) -> string -> unit |
"parse specs f use" parses the arguments given by Sys.argv
according to the argument processing specifications "specs".
Arguments begin with "-". Non-arguments are passed to "f" in
order. "use" is printed as part of the usage line if an error occurs.
Permitted arguments are specified using triples: (arg, action, help).
Actions are:
Unit(f): call f, no subseq. arg
Set(br): set ref to 'true', no subseq. arg.
Clear(br): set ref to 'false, no subseq. arg.
String(f): pass the subseq. arg to f
Int(f): pass the subseq. arg to f
Float(f): pass the subseq. arg to f
Rest(f): pass all subseq. args to f in order
|