github eantcal/nubasic v1.62.0
nuBASIC v.1.62

8 hours ago

Released nuBASIC 1.62

image
  • Added GetDateTime() built-in function returning a DateTime struct with all
    date/time fields in a single call (year, month, day, hour, minute, second,
    wday, yday). Preferred over the individual SysYear/SysMonth/SysDay/SysHour/
    SysMin/SysSec/SysWDay/SysYDay functions, which are now deprecated and will
    be removed in nuBASIC v2.0.
  • Added GetMouse() built-in function returning a Mouse struct with all pointer
    state in a single call (x, y, btn). Preferred over the individual
    GetMouseX/GetMouseY/GetMouseBtn functions, which are now deprecated and will
    be removed in nuBASIC v2.0.
  • The DateTime and Mouse struct types are pre-registered by the interpreter at
    startup, so "Dim dt As DateTime" and "Dim m As Mouse" work without a
    user-written Struct block.
  • Added SCREEN statement: SCREEN 0 switches to text/headless mode (I/O via
    the real console, all GDI drawing commands are silent no-ops — ideal for
    scripts, CI pipelines, and regression tests); SCREEN 1 restores full GDI
    console mode. Mirrors the GW-BASIC SCREEN command.
  • Added -t / --text-mode CLI flag: activates SCREEN 0 before the interpreter
    starts. stdout/stderr are routed to the caller's inherited handles (pipe,
    redirect, terminal) so test runners and CI pipelines can capture output
    without a GUI window. The interpreter exits cleanly after a batch command
    instead of blocking on stdin.
  • Added PowerShell (tests/run_tests.ps1) and Bash (tests/run_tests.sh)
    regression test runners. Each runner executes every test_*.bas file with
    -t -e, parses PASS/FAIL lines and the summary line, and reports per-suite
    and total results to stdout. A RunTests CMake/VS target invokes the
    appropriate script from Visual Studio or cmake --build.
  • Added regression tests: test_math, test_strings, test_arrays,
    test_control_flow, test_procedures, test_types, test_struct,
    test_struct_byref_file, test_struct_array, test_file_io.
  • Deprecated built-in help entries now carry a "DEPRECATED (v2.0)" note
    pointing to the replacement function.
  • Added ByRef / ByVal parameter qualifiers for Sub and Function definitions.
    ByRef passes the caller's variable by reference so mutations inside the
    procedure propagate back; ByVal (the default) passes by value. Both
    scalars (Integer, Double, String, …) and user-defined Struct variables
    can be passed ByRef.
  • Added support for the Call keyword: Call ProcName(arg1, arg2) is now
    a fully supported alternative to the bare ProcName arg1, arg2 syntax.
  • Added the Include / #Include directive: Include "filename.bas" loads
    and executes another source file at the point of the directive, enabling
    multi-file programs and shared library files.
  • Added byref, byval, call, and include to the set of reserved keywords
    so they cannot be used as user-defined variable or procedure names.
  • Updated built-in help: Help ByRef, Help ByVal, Help Call, and
    Help Include now display documentation for the new language features.
  • Added SCREENLOCK, SCREENUNLOCK, and REFRESH instructions for flicker-free
    graphics rendering. SCREENLOCK suspends the automatic per-primitive screen
    refresh so that multiple drawing commands (Line, Rect, FillRect, Ellipse,
    FillEllipse, TextOut, PlotImage, ...) accumulate on an off-screen back buffer.
    SCREENUNLOCK presents the completed frame in a single blit. REFRESH forces an
    immediate blit without altering the lock state (useful before blocking Input$
    calls or game-over dialogs).
  • Fixed window repaint flickering on Windows: text and cursor are now composited
    onto the off-screen back buffer before the single BitBlt to the screen,
    eliminating intermediate visible states during WM_PAINT.
  • Updated all graphical example programs to use the new screen-lock pattern:
    breakout2.bas, breakout3.bas, pingpong.bas, nutetris.bas, nutetris3d.bas,
    raycast3d.bas, plane.bas, clock.bas, cartoon.bas, minesHunter.bas,
    tictactoe.bas, line.bas, rosetta.bas, calc.bas.
  • Updated built-in help (HELP SCREENLOCK, HELP SCREENUNLOCK, HELP REFRESH).
  • CLI: after a graphics program ends, the console automatically overlays a
    "Press any key to continue..." prompt on the graphics frame and waits for a
    key before restoring text mode. No explicit keypress code is needed in
    BASIC programs.
  • Fixed rosetta.bas, parabola.bas, bitmap.bas: removed manual keypress code
    now handled automatically by the CLI; rosetta.bas timing messages are now
    drawn with TextOut at distinct positions so they no longer overlap.
  • IDE: fixed "Evaluate Selection" (F11) freezing after displaying a result or
    error. The timer that dismisses the annotation was incorrectly re-invoking the
    evaluation every three seconds instead of clearing it; errors also caused a
    stale annotation to be shown. Both issues are now resolved.
  • Added a new console for Windows that does not rely on the standard Windows console application
    (it works both attached to and detached from the IDE interface)
  • Updated Scintilla to the latest version
  • Added UTF-8 support for string literals and PRINT output: characters outside ASCII (Latin Extended,
    Cyrillic, Greek, CJK, etc.) are now correctly preserved through the tokenizer, interpreter, and
    rendered in the GDI console. Fixes silent stripping of non-ASCII bytes in both the CLI file-loading
    path (nu_interpreter.cc) and the IDE editor path (nuBasicEditor.cc rebuild_code).
  • Added hello_world_languages.bas example demonstrating multilingual output in 20 languages

Don't miss a new nubasic release

NewReleases is sending notifications on new releases.