<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 17 Nov 2009 19:23:33 +0000
From   : me@... (me@...)
Subject: Quine

On 17 Nov 2009, at 11:59, Mick Champion wrote:

> (Nothing could be as useless 
> as Quine though.)

Here's an improved version.

10 LET Q$ = "20 PRINT CHR$(49) + CHR$(48) + CHR$(32) + CHR$(76) + CHR$(69)
+ CHR$(84) + CHR$(32) + CHR$(81) + CHR$(36) + CHR$(32) + CHR$(61) + CHR$(32)
+ CHR$(34) + Q$ + CHR$(34): PRINT Q$"

20 PRINT CHR$(49) + CHR$(48) + CHR$(32) + CHR$(76) + CHR$(69) + CHR$(84)
+ CHR$(32) + CHR$(81) + CHR$(36) + CHR$(32) + CHR$(61) + CHR$(32) + CHR$(34)
+ Q$ + CHR$(34): PRINT Q$

(Note split lines, there are only two lines of BASIC.)

-- 
David Glover
http://www.davidglover.org/
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>