Files
rgbds/test/asm/multi-line-strings.asm
Rangi 96bce05be2 Newlines in multi-line strings update the line number
This affects error and warning messages, and dbgPrint
2021-02-14 16:16:52 +01:00

35 lines
527 B
NASM

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 """
EMPTY1 EQUS ""
EMPTY2 EQUS "\ ; comment
"
EMPTY3 EQUS """"""
EMPTY4 EQUS """\ ; comment
"""
PRINTLN STRCAT("(", "{EMPTY1}", "{EMPTY2}", "{EMPTY3}", "{EMPTY4}", ")")
warn "check the line number"