shithub: rgbds

ref: c2ca46c27d622a17c6248782d628c89c49bfb972
dir: /test/asm/multi-line-strings.asm/

View raw version
S EQUS "Hello"

PRINT "\"\"\"\n"

PRINT """{S}
world
"""

PRINT """The multi-line string \ ; line continuations work
can contain:
- "single quotes"
- ""double quotes""
- even escaped \"""triple"\"" ""\"quotes\"\"\"
!"""

PRINT """\n"""

printarg: MACRO
	PRINTLN "arg <\1>"
	PRINTLN """arg (\1)"""
ENDM

	printarg "
	printarg """multi-line
string argument"""

EMPTY1 EQUS ""
EMPTY2 EQUS "\ ; comment
"
EMPTY3 EQUS """"""
EMPTY4 EQUS """\ ; comment
"""
	PRINTLN STRCAT("(", "{EMPTY1}", "{EMPTY2}", "{EMPTY3}", "{EMPTY4}", ")")

	warn "check the line number"