Another quine
- Posted by Davi Tassinari de Figueiredo <davitf at USA.NET> Aug 21, 2000
- 505 views
Hi again, I know most of you are not interested at all in this, but I thought someone might like it: I've just made another program that prints itself on the screen. Although it is somewhat larger than my previous one (removing the comment and making some minor modifications, that one becomes 453 bytes long, while this one is 545 bytes long), I think this one uses a more interesting method (?). -- begin code atom k,b constant q='"',s='\\',n='\n',r=q&s,z={s&q,s&s},a={ "atom k,b constant q='\"',s='\\\\',n='\\n',r=q&s,z={s&q,s&s},a={", "}puts(1,a[1]&n&q)for o=1to length(a[1])do b=a[1][o]k=find(b,r)if k", "then puts(1,z[k])else puts(1,b)end if end for for o=2to 4do", "puts(1,q&','&n&q&a[o])end for puts(1,q)for o=2to 4do puts(1,n&a[o])end for" }puts(1,a[1]&n&q)for o=1to length(a[1])do b=a[1][o]k=find(b,r)if k then puts(1,z[k])else puts(1,b)end if end for for o=2to 4do puts(1,q&','&n&q&a[o])end for puts(1,q)for o=2to 4do puts(1,n&a[o])end for -- end code Regards, Davi Figueiredo davitf at usa.net