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 / repro.icn < prev    next >
Text File  |  2000-08-04  |  849b  |  28 lines

  1. ############################################################################
  2. #
  3. #    File:     repro.icn
  4. #
  5. #    Subject:  Program to self-reproduce
  6. #
  7. #    Author:   Kenneth Walker
  8. #
  9. #    Date:     August 4, 2000
  10. #
  11. ############################################################################
  12. #
  13. #   This file is in the public domain.
  14. #
  15. ############################################################################
  16. #
  17. #    This program generates the shortest known self-reproducing Icon
  18. #    program.  The generated program is identical to this file except
  19. #    for deletion of this header and the "global x" declaration, which
  20. #    appear here so that the Icon library builds cleanly.
  21. #
  22. ############################################################################
  23.  
  24. global x
  25.  
  26. procedure main();x:="procedure main();x:= \nx[21]:=image(x);write(x);end"
  27. x[21]:=image(x);write(x);end
  28.