prog8/examples/test.p8
Irmen de Jong 1509de390e various fixes
print_f() no longer prints a leading space.
Better error message if using float in for loop.
Fix crash when using non-const as when choice value.
VM print_f() more closely resembles the CBM version.
2023-12-02 18:23:54 +01:00

41 lines
753 B
Lua

%zeropage basicsafe
%import floats
%import textio
%option no_sysinit
main {
sub start() {
floats.print_f(0.0)
txt.nl()
floats.print_f(1.0)
txt.nl()
floats.print_f(11111.0)
txt.nl()
floats.print_f(1e10)
txt.nl()
floats.print_f(1.234)
txt.nl()
floats.print_f(111.234)
txt.nl()
floats.print_f(-111.234)
txt.nl()
floats.print_f(-111.234)
txt.nl()
uword zz
const ubyte check = 99
when zz {
1,2,check -> {
cx16.r0++
}
9999 -> {
cx16.r0++
}
else -> {
cx16.r0++
}
}
}
}