[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Forms' (#lcl)

TApplication.GetParams

Returns the command line argument at the specified position.

Declaration

Source position: forms.pp line 1596

protected function TApplication.GetParams(

  Index: Integer

):string; override;

Arguments

Index

  

Ordinal position for the requested parameter value.

Function result

String with the parameter value, or an empty string.

Description

GetParams is an overridden String function in TApplication used to get the argument at the specified position in the command line. It re-implements the read access specifier for the property from the ancestor class, and does not call the inherited method.

Index is the ordinal position for the requested parameter value. Index must be in the range 0..ParamCount-1 or an EListError exception is raised. Position 0 contains the name of the executable file for the application.

The return value contains the UTF-8-encoded String with the value for the parameter at the specified position. It is retrieved using the ParamStrUTF8 routine for the position in Index.

See also

ParamStrUTF8

TCustomApplication.Params

TCustomApplication.ParamCount


Version 3.2 Generated 2024-02-25 Home