Node: ParamCount, Next: ParamStr, Previous: PAnsiChar, Up: Reference

### ParamCount

#### Synopsis

         function ParamCount: Integer;

#### Description

`ParamCount` returns the number of command-line arguments given to the program. `ParamCount` returns 0 if no arguments have been given to the program; the name of the program as an implicit argument is not counted.

#### Conforming to

`ParamCount` is a Borland Pascal extension.

#### Example

         program ParamCountDemo;

         var
           i: Integer;

         begin
           WriteLn ('You have invoked this program with ',
                    ParamCount, ' arguments.');
           WriteLn ('These are:');
           for i := 1 to ParamCount do
             WriteLn (ParamStr (i))
         end.

#### See also

ParamStr.