Previous: 4.67.2.57. Ord function To the Table of Contents Next: 4.67.2.59. ParamStr function
4.67.2.57. Ord function Table of Contents 4.67.2.59. ParamStr function

- 4.67.2.58. -
Table of Contents
4. Standard Units
4.67. System - Built-in routines
4.67.2. System Unit Procedures and Functions
4.67.2.58. ParamCount function


4.67.2.58. ParamCount function

Targets: MS-DOS, OS/2, Win32


System Unit

Returns the number of parameters passed to the program on the command line.

Declaration:
function ParamCount: Longint;
Remarks:
Command line parameters are separated by spaces or tabs. To retrieve command line parameters call ParamStr.

Example:
{$ifndef __CON__}
  This program must be compiled as console application only
{$endif}
begin
  if ParamCount = 0 then begin
    WriteLn('No parameters specified.');
    Halt(1);
  end;
end.



Previous: 4.67.2.57. Ord function To the Table of Contents Next: 4.67.2.59. ParamStr function
4.67.2.57. Ord function Table of Contents 4.67.2.59. ParamStr function

- 4.67.2.58. -