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 / iwriter.icn < prev    next >
Text File  |  2000-07-29  |  788b  |  29 lines

  1. ############################################################################
  2. #
  3. #    File:     iwriter.icn
  4. #
  5. #    Subject:  Program to write Icon code to write input
  6. #
  7. #    Author:   Ralph E. Griswold
  8. #
  9. #    Date:     March 7, 1990
  10. #
  11. ############################################################################
  12. #
  13. #   This file is in the public domain.
  14. #
  15. ############################################################################
  16. #
  17. #     Program that reads standard input and produces Icon expressions,
  18. #  which when compiled and executed, write out the original input.
  19. #
  20. #     This is handy for incorporating, for example, message text in
  21. #  Icon programs.  Or even for writing Icon programs that write Icon
  22. #  programs that ... .
  23.  
  24. procedure main()
  25.  
  26.    while  write("write(",image(read()),")")
  27.  
  28. end
  29.