System.ParamStr

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function ParamStr(Index: Integer): string;

C++

extern DELPHI_PACKAGE UnicodeString __fastcall ParamStr(int Index);

Properties

Type Visibility Source Unit Parent
function public
System.pas
System.hpp
System System

Description

Returns a specified parameter from the command line.

ParamStr returns the parameter from the command line that corresponds to Index, or an empty string if Index is greater than ParamCount. For example, an Index value of 2 returns the second command-line parameter.

Note: ParamStr(0) returns the path and file name of the executing program (for example, C:\TEST\MYPROG.EXE).


Note: Use double quotation marks to wrap multiple words as one parameter (such as long file names containing spaces).

See Also

Code Examples