home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / PASCAL / PT03.ZIP / ECHOARG.AR < prev    next >
Encoding:
Text File  |  1983-09-02  |  769 b   |  41 lines

  1. -h- echoarg.cmd 309
  2. { echo -- echo command line arguments to output }
  3. procedure echo;
  4. var
  5.  i, j : integer;
  6.  argstr : string;
  7. begin
  8.  i := 1;
  9.  while (getarg(i, argstr, MAXSTR)) do begin
  10.   if (i > 1) then
  11.    putc(BLANK);
  12.   for j := 1 to length(argstr) do
  13.    putc(argstr[j]);
  14.   i := i + 1
  15.  end;
  16.  if (i > 1) then
  17.   putc(NEWLINE)
  18. end;
  19. -h- echoarg.pas 294
  20. {$debug-}
  21. program outer (input,output);
  22.  
  23. {$include:'globcons.inc'}
  24. {$include:'globtyps.inc'}
  25.  
  26. {$include:'initio.dcl'}
  27. {$include:'getarg.dcl'}
  28. {$include:'putc.dcl'  }
  29. {$include:'length.dcl'}
  30. {$include:'flush.dcl' }
  31.  
  32. {$include:'echoarg.cmd'    }
  33. BEGIN
  34.   minitio; initio;
  35.   echo;
  36.   flush(0);
  37. END.
  38. -h- echoarg.mak 66
  39. echoarg+initio+getfcb+error+getarg+nargs+putc+putcf+
  40. length+flush
  41.