Date : Sun, 15 Nov 2009 17:07:34 +0000
From : rs423@... (Mick Champion)
Subject: Quine
me@... wrote:
> Disclaimer: I didn't write this, but I did adapt it for BBC BASIC.
>
> 10DATA B$="DATA "
> 20DATA FOR J=10 TO 180 STEP 10
> 30DATA READ A$
> 40DATA PRINT J;B$;A$
> 50DATA IF J<>90 THEN 170
> 60DATA RESTORE
> 70DATA B$=" "
> 80DATA NEXT J
> 90DATA END
> 100 B$="DATA "
> 110 FOR J=10 TO 180 STEP 10
> 120 READ A$
> 130 PRINT J;B$;A$
> 140 IF J<>90 THEN 170
> 150 RESTORE
> 160 B$=" "
> 170 NEXT J
> 180 END
>
>
I just typed that in. The program would have produced the correct output
had I not accidentally typed "20 DATA FOE J=10 TO 180 STEP 10" instead
of FOR. Almost as quick as listing too. What was it written for? A laugh??
Mick.