mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Implement PRINT and PRINTLN (#672)
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
This commit is contained in:
@@ -1,23 +1,23 @@
|
||||
S EQUS "Hello"
|
||||
|
||||
PRINTT "\"\"\"\n"
|
||||
PRINT "\"\"\"\n"
|
||||
|
||||
PRINTT """{S}
|
||||
PRINT """{S}
|
||||
world
|
||||
"""
|
||||
|
||||
PRINTT """The multi-line string \ ; line continuations work
|
||||
PRINT """The multi-line string \ ; line continuations work
|
||||
can contain:
|
||||
- "single quotes"
|
||||
- ""double quotes""
|
||||
- even escaped \"""triple"\"" ""\"quotes\"\"\"
|
||||
!"""
|
||||
|
||||
PRINTT """\n"""
|
||||
PRINT """\n"""
|
||||
|
||||
printarg: MACRO
|
||||
PRINTT "arg <\1>\n"
|
||||
PRINTT """arg (\1)\n"""
|
||||
PRINTLN "arg <\1>"
|
||||
PRINTLN """arg (\1)"""
|
||||
ENDM
|
||||
|
||||
printarg "
|
||||
@@ -29,4 +29,4 @@ EMPTY2 EQUS "\ ; comment
|
||||
EMPTY3 EQUS """"""
|
||||
EMPTY4 EQUS """\ ; comment
|
||||
"""
|
||||
PRINTT STRCAT("(", "{EMPTY1}", "{EMPTY2}", "{EMPTY3}", "{EMPTY4}", ")\n")
|
||||
PRINTLN STRCAT("(", "{EMPTY1}", "{EMPTY2}", "{EMPTY3}", "{EMPTY4}", ")")
|
||||
|
||||
Reference in New Issue
Block a user