mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Fixes #669 Closes #368 Closes #624 Deprecate PRINTT, PRINTV, PRINTI, and PRINTF Default STRFMT("%f") to 5 fractional digits like "{f:}" Any use of string formatting will share this default
33 lines
496 B
NASM
33 lines
496 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}", ")")
|