[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'CmdLine' (#Pkg)

DefineRangeOption

Defines a new range option.

Declaration

Source position: cmdline.pas line 352

procedure DefineRangeOption(

  ShortOpt: Char;

  const LongOpt: string;

  VarPtr: PLongint;

  Min: LongInt;

  Max: LongInt;

  const Help: UTF8String;

  const ArgName: string;

  Flags: TOptionFlags = []

);

Arguments

ShortOpt

  

Short option (If there is no short option then set it to #0)

LongOpt

  

Long option

VarPtr

  

If VarPtr is not nil then the variable pointed by VarPtr is set according to the command line.

Min

  

Minimal valid value

Max

  

Maximal valid value

Help

  

The help string associated with the option.

ArgName

  

The argument name of the option. It is used by DisplayHelp.

Description

The command line parser raises ECmdLineError exception if the value is not in [Min..Max].

See also

DisplayHelp

  

Display the help for the tool.