Fandom

Delphi Programming

FindCmdLineSwitch Routine

2,918pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

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.)

Also on Fandom

Random Wiki