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



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

TCustomApplication.FindOptionIndex

Return the index of an option.

Declaration

Source position: CustApp.pp line 55

public function TCustomApplication.FindOptionIndex(

  const S: String;

  var Longopt: Boolean

):Integer;

Arguments

S

  

Short option to search for.

Longopt

  

Long option to search for.

Function result

Position on commandline of option.

Description

FindOptionIndex will return the index of the option S or the long option LongOpt. Neither of them should include the switch character. If no such option was specified, -1 is returned. If either the long or short option was specified, then the position on the command-line is returned.

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

HasOption

  

Check whether an option was specified.

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