Wikia

Delphi Programming

FindCmdLineSwitch Routine

2,918pages on
this wiki
Talk0
Info
see the VCL Documentation Guidelines for an overview on doc pages

UnitEdit

DescriptionEdit

Definition (Delphi 6, 2009, 2010):
function FindCmdLineSwitch(const Switch: string; const Chars: TSysCharSet; IgnoreCase: Boolean): Boolean; overload;
function FindCmdLineSwitch(const Switch: string): Boolean; overload;
function FindCmdLineSwitch(const Switch: string; IgnoreCase: Boolean): Boolean; overload;


Returns true if the passed string parameter is in the parameters list received by the executable.

  • TSysCharSet (set) contains characters that can be used to specify parameters.
  • IgnoreCase (boolean) case sensitivy toggle.

Technical CommentsEdit

(Known issues / Documentation clarifications / Things to be aware of)

ExamplesEdit

var 
  MySysCharSet: TSysCharSet;
begin
  MySysCharSet := ['/'];
  if FindCmdLineSwitch('param1', MySysCharSet, False) then 
    ShowMessage('param1 parameter found');
end;

See AlsoEdit

User Comments/TipsEdit

(Please leave your name with your comment.)

Around Wikia's network

Random Wiki