-
Notifications
You must be signed in to change notification settings - Fork 14
Home
Shinya Okano edited this page Jan 12, 2017
·
1 revision
Welcome to the delphi-argparse wiki!
var
Parser: TArgumentParser;
ParseResult: TParseResult;
begin
Parser := TArgumentParser.Create;
Parser.AddArgument('--foo', saBool); // --foo
Parser.AddArgument('--bar', saStore); // --bar bar_value
ParseResult := Parser.ParseArgs; // if omitted, ParamStr is used.
// ParseResult := Parser.ParseArgs(ListOfString);
ParseResult.HasArgument('foo'); // It returns Boolean.
ParseResult.GetValue('bar'); // It returns String.
end;