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:
Rangi
2021-01-01 20:37:32 -05:00
committed by GitHub
parent 9d2d5cfcfe
commit a70ecba06f
64 changed files with 325 additions and 316 deletions

View File

@@ -1,21 +1,21 @@
X = 42
PRINTT "{X}\n"
PRINTT "{x:X}\n"
PRINTT "{X:X}\n"
PRINTT "{d:X}\n"
PRINTT "{b:X}\n"
PRINTLN "{X}"
PRINTLN "{x:X}"
PRINTLN "{X:X}"
PRINTLN "{d:X}"
PRINTLN "{b:X}"
Y equ 1337
PRINTT "{b:Y}\n"
PRINTLN "{b:Y}"
rsreset
R rb 0
PRINTT "{d:R}\n"
PRINTLN "{d:R}"
S equs "You can't format me!"
PRINTT "{X:S}\n"
PRINTLN "{X:S}"
SECTION "Test", ROM0
Label:
PRINTT "{x:Label}\n"
PRINTT "{x:@}\n"
PRINTLN "{x:Label}"
PRINTLN "{x:@}"