A self printing program
From CacheWiki
Quines
These are examples of Quine programs, there is a web-site listing Quines for lots of different languages here: http://www.nyx.net/~gthompso/quine.htm
If you have your own version of this trick you can post it here.
- Here is a useless program on cache which print itself. You should run it from terminal - User:Logist 14:10, 6 August 2007 (UTC)
s a="s a= w $e(a,1,4),$c(34),a,$c(34),$e(a,5,345)" w $e(a,1,4),$c(34),a,$c(34),$e(a,5,345)
- This is my somewhat perverse solution, (in fact it uses the same principle as Logist's version) - MrCache 13:17, 9 August 2007 (UTC)
s s="s s="""" f l=105,l+1,5_$l(s),l-1 w $e(s,l\100,l#100)""" f l=105,l+1,5_$l(s),l-1 w $e(s,l\100,l#100)