[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 9.191 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

section 9.192 ParamStr.

This document was generated by Frank Heckenbach on May, 10 2002 using texi2html