summaryrefslogtreecommitdiff
path: root/ipl/progs/repro.icn
blob: c1d826486b794cd091e0e0720aaaa479f501bcc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
############################################################################
#
#	File:     repro.icn
#
#	Subject:  Program to self-reproduce
#
#	Author:   Kenneth Walker
#
#	Date:     August 4, 2000
#
############################################################################
#
#   This file is in the public domain.
#
############################################################################
#
#	This program generates the shortest known self-reproducing Icon
#	program.  The generated program is identical to this file except
#	for deletion of this header and the "global x" declaration, which
#	appear here so that the Icon library builds cleanly.
#
############################################################################

global x

procedure main();x:="procedure main();x:= \nx[21]:=image(x);write(x);end"
x[21]:=image(x);write(x);end