File COPYTX.PS

Directory of image this file is from
This file as a plain text file

{$B4 4 block buffers -- declare before program statement}
PROGRAM copyText(input,output); {$L-}
(* A simple text file copy program. *)
CONST maxlinelength = 132 (* we will wrap long lines *);
VAR   linelength : integer;
BEGIN
  WHILE NOT EOF(input) DO
    BEGIN
      linelength := 0;
      WHILE NOT EOLN(input) DO
	BEGIN
	  output^ := input^;
	  PUT(output);
	  GET(input);
	  linelength := linelength + 1;
	  IF linelength >= maxlinelength THEN
	    BEGIN
	      writeln(output);
	      write(output,'-->');
	      linelength := 3
	    END
	END;
      WRITELN(output);
      READLN(input)
    END
END.



Feel free to contact me, David Gesswein djg@pdp8online.com with any questions, comments on the web site, or if you have related equipment, documentation, software etc. you are willing to part with.  I am interested in anything PDP-8 related, computers, peripherals used with them, DEC or third party, or documentation. 

PDP-8 Home Page   PDP-8 Site Map   PDP-8 Site Search