help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Types][Classes] Reference for unit 'CustApp' (#fcl)

TCustomApplication.HasOption

Check whether an option was specified.

Declaration

Source position: line 0

public function TCustomApplication.HasOption(

  const S: String

):Boolean;

function TCustomApplication.HasOption(

  const C: Char;

  const S: String

):Boolean;

Arguments

S

  

Long option string

Function result

True if the option S or C was specified on the command-line.

Arguments

C

  

Short option character.

S

  

Long option string

Function result

True if the option S or C was specified on the command-line.

Description

HasOption returns True if the specified option was given on the command line. Either the short option character C or the long option S may be used. Note that both options (requiring a value) and switches can be specified.

Depending on the value of the CaseSensitiveOptions property, the search is performed case sensitive or case insensitive.

Options are identified as command-line parameters which start with OptionChar (by default the dash ('-') character).

See also

FindOptionIndex

  

Return the index of an option.

GetOptionValue

  

Return the value of a command-line option.

CheckOptions

  

Check whether all given options on the command-line are valid.

CaseSensitiveOptions

  

Are options interpreted case sensitive or not

OptionChar

  

Command-line switch character

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505