← All news Releases

BASIC-256 v2.3.1 released

2.3.1 adds a GUI toolkit module, ARRAYADD and a dark IDE that follows the system, renames the module routines with a prefix, and makes saving safer.

BASIC-256 v2.3.1 is out. Where 2.3.0 reworked how a program reaches its files, 2.3.1 is about building things: a toolkit for drawing buttons, sliders and text fields on the graphics window, a statement that grows an array one row at a time, an IDE that goes dark with the rest of the system, and saving that is harder to get wrong.

Programs written for 2.3.0 keep working unless they use the bundled math.kbs or turtle.kbs modules, whose routines have been renamed — see the note at the end. Builds are available for Windows, macOS (Apple Silicon and Intel), Linux and the Raspberry Pi, and BASIC-256 also runs in a browser tab with nothing to install.

What 2.3.1 brings

  • A GUI toolkit, with the new toolkit.kbs module. include "toolkit.kbs" gives a program a classic-style window interface drawn on the graphics output: push buttons, checkboxes, radio buttons, sliders, spin boxes, tabs, group boxes, drawing fields and editable text fields. Each element has a subroutine that draws it, such as tk_button, and a function that tells whether a mouse click landed on it, such as tk_buttonhit. call tk_help() lists them all, and the programs in Examples/GUI-Demo show each one at work.
  • Arrays can grow, with the new ARRAYADD statement. arrayadd names, "Bob" adds a value to the end of a list, and arrayadd points, x, y adds a row to a two-dimensional array. A variable with nothing in it yet becomes an array, so a table can be built up in a loop without a DIM.
  • Every module routine carries its module’s name. The routines in the bundled modules now start with a two-letter prefix — ma_ for math.kbs, tu_ for turtle.kbs, tk_ for toolkit.kbs — so they can never clash with a program’s own functions or with each other. Each module has a help routine, ma_help, tu_help and tk_help, that prints what is in it.
  • A dark IDE that follows the system. View ▸ Theme ▸ Follow System turns the whole IDE dark when the computer is in dark mode — menus, toolbars, docks and dialogs as well as the Edit, Text Output and Variable Watch windows.
  • Safer saving. Save As opens in the program’s own folder with its name already filled in, and the example programs are never overwritten: saving one asks for a new name. A new preference, Warn when overwriting an existing file, is on by default; untick it to let Save write straight back to the program’s own file.
  • Mouse clicks on a scaled-up graphics window. CLICKX, CLICKY and double-clicks now work all over a window enlarged by GRAPHSIZE or zoomed from the View menu, reporting the graphics pixel under the pointer the way MOUSEX and MOUSEY already did.

Also in this release

  • New examples: a series of Falling Sand programs that build up the final program step by step; Examples/Fun/balgame256.kbs, a ball-catching game played with the mouse; and Examples/Fun/FallingLetters.kbs, a rain of green letters fading as they fall. Both of the Fun programs also run in the browser.
  • A whole number too big for 64 bits, such as 9223372036854775808, is now reported as “Number too large” when the program is compiled.
  • A negative graphics scale now shows the whole picture turned round, including the last row and column.
  • The Raspberry Pi archive now includes the TestSuite and the benchmark.
  • The Windows installer and uninstaller notice when BASIC-256 is still running and offer Retry and Cancel, instead of stopping with an error about basic256.exe.

Things to watch when upgrading

  • A program that includes math.kbs or turtle.kbs has to use the new names: sumarr, hypot and t_forward are now ma_sumarr, ma_hypot and tu_forward, and so on, and a program still calling the old names stops with an error. Two names change by more than the prefix: remap is now ma_map, and fround has been removed.
  • arrayadd is now a reserved word, so a program that used it as the name of a variable or a function has to rename it.
  • The Automatically save program when it is successfully run preference has gone; the new overwrite warning takes its place.

The ChangeLog has the full list, and the release notes summarise every version so far.

Pick your platform and download it, or try it in your browser first.