All Projects → tokibito → Delphi Argparse

tokibito / Delphi Argparse

Licence: mit
Command line argument parser for Delphi.

Programming Languages

pascal
1382 projects
delphi
115 projects

======================== Nullpobug.ArgumentParser

Command line argument parser for Delphi.

Requirements

  • Delphi 2007 or FPC

License

  • MIT License

Usage

::

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;

Example

Example codes are in "Example" directory.

::

cd delphi-argparse\Example make win32 ArgumentParserExample.exe --foo -b 123 abc def foo: True bar: 123 arg1 :abc arg2 :def

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].