Kód:
Returns a specified parameter from the command-line.

Unit

System

Category

command line utilities

Delphi syntax:

function ParamStr(Index: Integer): string;

C++ syntax:

extern PACKAGE AnsiString __fastcall ParamStr(int Index);

Description

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.

On Windows, ParamStr(0) returns the path and file name of the executing program (for example, C:\TEST\MYPROG.EXE).
	On Linux, ParamStr(0) returns the command used to execute the program, without parameters (for example, ./myprogram). This behavior is dependent on information returned by the shell program and may not be consistent among all shells.
Note:	Use double quotes to wrap multiple words as one parameter (such as long file names containing spaces).
Z ParamStr(0) zjistuji, v jakem adresari je umisten program, abych vedel kam ukladat nastaveni apod. No a pak pomoci ParamCount
Kód:
Returns the number of parameters passed on the command line.

Unit

System

Category

command line utilities

Delphi syntax:

function ParamCount: Integer;

C++ syntax:

extern PACKAGE int __fastcall ParamCount(void);

Description

ParamCount returns the number of parameters passed to the program on the command line. Separate parameters with spaces or tabs. Use double quotes to wrap multiple words as one parameter (such as long file names containing spaces).
zjistuju jestli mam zacit otvirat nejaky soubor, ale lze to zjistovat i pres if (ParamStr(1) <> '') ....