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

  1. -h- charcnt.cmd 207
  2. { charcount -- count characters in standard input }
  3. procedure charcount;
  4. var
  5.  nc : integer;
  6.  c : character;
  7. begin
  8.  nc := 0;
  9.  while (getc(c) <> ENDFILE) do
  10.   nc := nc + 1;
  11.  putdec(nc, 1);
  12.  putc(NEWLINE)
  13. end;
  14. -h- charcnt.pas 296
  15. {$debug-}
  16. program outer (input,output);
  17.  
  18. {$include:'globcons.inc'}
  19. {$include:'globtyps.inc'}
  20.  
  21. {$include:'initio.dcl'}
  22. {$include:'getc.dcl'  }
  23. {$include:'putc.dcl'  }
  24. {$include:'putdec.dcl'}
  25. {$include:'flush.dcl' }
  26.  
  27. {$include:'charcnt.cmd' }
  28. BEGIN
  29.   minitio; initio;
  30.   charcount;
  31.   flush(0);
  32. END.
  33. -h- charcnt.mak 62
  34. charcnt+initio+getc+putc+putdec+itoc+getfcb+error+putcf+flush
  35.