v10.2
breaking change: boolean types are much stricter than before.
- they're no longer 'equivalent' to bytes, you'll have to cast them explicitly if you still want to convert between bytes and booleans.
- If you are using conditionals like "if integervariable {....}" you'll have to make it into a boolean comparison expression like so "if integervariable!=0 {....}" .
- however there's a new
-nostrictbool
command line option that allow implicit conversions between bool and bytes again. This allows prog8 to compile most older code without source changes. Note that this option will likely be removed in a future version, so it's advised to actually go update your program code to be properly compatible with the new version. - a bunch of library routines have been changed to properly accept boolean arguments and return boolean values (rather than bytes 0 or 1).
- this enables more optimized code generation for many boolean expressions.
new library functions
- cx16.kbdbuf_clear() is moved to cbm.kbdbuf_clear() and is now available on all cbm targets
- sys.poweroff_system() moved to cx16, sys.set_leds_brightness() moved to cx16 and changed to set_led_brightness, you can only change the activity led brightness.
- string.strip(), string.trim() and l/r variants of them.
- txt.petscii2scr() and txt.petscii2scr_str() to convert petscii characters to screencode.
- math.randrange() and math.randrangew()
- txt.bell()
- txt.print_bool()
- sys.exit2() and sys.exit3() to allow you to set also the X or X+Y registers on program exit, rather than just A.
- monogfx.drawmode() to select the draw mode, it can now also draw in inverted/eor mode.
- diskio got more routines implemented for the 'virtual' target.
- the conv routines that convert numbers to strings now return pointer to the resulting string buffer.
- for the virtual target: txt.width() and txt.height() now return the actual terminal size if possible
other changes
- '\t' is now recognised as a tab character inside iso strings
- many bugfixes and optimizations
New Contributors
- @adiee5 made their first contribution in #123
- @mike-mcgann made their first contribution in #126
Full Changelog: v10.1...v10.2