?login_element?

Subversion Repositories NedoOS

Rev

Rev 728 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. program CommandLine;
  2. {
  3.   COMMANDLINE PARAMETERS DEMONSTRATION PROGRAM  Version 1.00A
  4.  
  5.   This program gets parameters from the command line:
  6.  
  7.   INSTRUCTIONS
  8.     1.  Load the TURBO compiler and compile to a .COM file
  9.     2.  Quit the TURBO compiler and execute the program with
  10.         parameters.  Try:
  11.  
  12.                 cmdlin abc def
  13.                 cmdlin Greetings from Frank Borland!
  14.                 cmdlin
  15.  
  16.   NOTE:  For information about these functions, please refer to your
  17.          TURBO 3.0 Reference Manual.
  18. }
  19.  
  20.  
  21. var
  22.   i : integer;
  23.   a : integer;
  24.   F: file of integer{Text};
  25.  
  26. begin
  27.   for i := 1 to ParamCount do
  28.     writeln(ParamSTR(i));
  29.   assign(F,'pastest.dat');
  30.   Rewrite(F);
  31.   a := 5;
  32.   write(F,a);
  33.   Close(F);
  34. end.
  35.  
  36.