home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / historic / v941.tgz / icon.v941src.tar / icon.v941src / ipl / progs / catlines.icn < prev    next >
Text File  |  2000-07-29  |  702b  |  32 lines

  1. ############################################################################
  2. #
  3. #    File:     catlines.icn
  4. #
  5. #    Subject:  Program to concatenate lines of a file
  6. #
  7. #    Author:   Ralph E. Griswold
  8. #
  9. #    Date:     January 14, 1999
  10. #
  11. ############################################################################
  12. #
  13. #  This file is in the public domain.
  14. #
  15. ############################################################################
  16. #
  17. #  This program concatenates all the lines from standard input and
  18. #  writes the result to standard output.
  19. #
  20. ############################################################################
  21.  
  22. procedure main()
  23.    local line
  24.  
  25.    line := ""
  26.  
  27.    while line ||:= read()
  28.  
  29.    write(line)
  30.  
  31. end
  32.