LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

Make a shorter quine

Root / General / [.]

12Me21Created:
A quine is a program that outputs its own code.
P$="+CHR$(34)?RIGHT$(P$,4);P$*2P$="+CHR$(34)?RIGHT$(P$,4);P$*2P$="
This is the shortest one I've found in SB (and it's just a modified version of an existing one) I'm sure that it can be made shorter. Have fun.....

something something use syntax errors as output and type the output directly as code. Since there's no concept of stderr vs stdout in SB, it should still count.

Of course error quines are easy:
Syntax error in 0:1
NEXT without FOR in 0:1
etc.
but I want a "real" quine

Awww but those are real in SB :^)

This is actually pretty important... I wonder if it's even possible though.

Here's 13 characters shorter (53 characters)
READ S$?S$+CHR$(34)+S$DATA"READ S$?S$+CHR$(34)+S$DATA
With line breaks
READ S$
?S$+CHR$(34)+S$
DATA"READ S$?S$+CHR$(34)+S$DATA
This was so strange to code I used DATA and READ since the string is after the print statement, that prevents infinitely long code... I guess?

Oh, nice I made a few that are shorter than the original, but still just 1 character longer than yours:
S$="+CHR$(34)?MID$(S$*3,26,99)S$="+CHR$(34)?MID$(S$*3,26,99)S$="
S$="+CHR$(34)?RIGHT$(S$*3,62)S$="+CHR$(34)?RIGHT$(S$*3,62)S$="
?MID$(("+CHR$(34))*3,19,54)?MID$(("+CHR$(34))*3,19,54)

I just realized they all have symmetry, you can cut them down the center and they're the same, just one side has to be in a string. Knowing that might help make them shorter. This is fun I wonder if using a FOR loop somehow would help.