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



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

Paramcount

Return number of command-line parameters passed to the program.

Declaration

Source position: systemh.inc line 770

function Paramcount: LongInt;

Description

Paramcount returns the number of command-line arguments. If no arguments were given to the running program, 0 is returned.

Errors

None.

See also

Paramstr

  

Return value of a command-line argument.

Example

Program Example46;

{ Program to demonstrate the ParamCount and ParamStr functions. }
Var
  I : Longint;

begin
  Writeln (paramstr(0),' : Got ',ParamCount,' command-line parameters: ');
  For i:=1 to ParamCount do
    Writeln (ParamStr (i));
end.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505