next up previous contents index
Next: Paramstr Up: Functions and Procedures Previous: Ord

Paramcount

   

Declaration:

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

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.



Michael Van Canneyt
Thu Sep 10 14:02:43 CEST 1998