[Overview][Constants][Types][Procedures and functions] Reference for unit 'objpas' (#rtl)

ParamStr

Return command-line parameter

Declaration

Source position: objpas.pp line 67

function ParamStr(

  Param: Integer

):Ansistring;

Description

ParamStr returns the Param-th command-line parameter as an AnsiString. The system unit Paramstr function limits the result to 255 characters, and is overridden with this function.

The zeroeth command-line parameter contains the path of the executable. On some operating systems (BSD) it may be simply the command as typed on the command-line, because the OS does not offer a method to retrieve the full binary name.

For an example, see #rtl.system.Paramstr.

Errors

In case Param is an invalid value, an empty string is returned.

See also

Paramstr

  

Return command-line parameter