qp.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
PARAMS.PAS
  Example Contents Index                                    Back
 
PROGRAM params;
 
{ PARAMS.PAS illustrates the following routines used for accessing
  command-line arguments:
 
      ParamCount      ParamStr
 
  Other programs that use these routines include:
 
      EXITHALT.PAS    SUMINT.PAS    SUMREAL.PAS
}
 
CONST
    program_name = 'PARAMS ';
    program_desc = 'echoes its command-line parameters.';
 
VAR
    count, i : Word;
 
BEGIN
 
    Writeln( program_name, program_desc );
    Writeln;
 
    { Display each command-line argument. }
    Writeln( 'Command-line arguments:' );
    Writeln;
    count := ParamCount;
    FOR i :=0 TO count DO
        Writeln( 'Parameter ', i, '   ', ParamStr( i ) );
 
END.