home *** CD-ROM | disk | FTP | other *** search
- -h- linecnt.cmd 227
- { linecount -- count lines in standard input }
- procedure linecount;
- var
- nl : integer;
- c : character;
- begin
- nl := 0;
- while (getc(c) <> ENDFILE) do
- if (c = NEWLINE) then
- nl := nl + 1;
- putdec(nl, 1);
- putc(NEWLINE)
- end;
- -h- linecnt.pas 296
- {$debug-}
- program outer (input,output);
-
- {$include:'globcons.inc'}
- {$include:'globtyps.inc'}
-
- {$include:'initio.dcl'}
- {$include:'getc.dcl' }
- {$include:'putc.dcl' }
- {$include:'putdec.dcl'}
- {$include:'flush.dcl' }
-
- {$include:'linecnt.cmd' }
- BEGIN
- minitio; initio;
- linecount;
- flush(0);
- END.
- -h- linecnt.mak 62
- linecnt+initio+getc+putc+putdec+itoc+getfcb+error+putcf+flush