Skip to content

v0.2.219

Choose a tag to compare

@hanlokesu hanlokesu released this 05 Dec 13:11
· 10 commits to main since this release

PB64Basic Enhanced v0.2.219 - batch 439.

See the full changelog in README.md


batch 439 (v0.2.219) - the documented default subsystem now matches what the compiler has always emitted and what PB/Win 10 produces: a source with no #COMPILE / #CONSOLE directive becomes a Windows GUI EXE (PE subsystem 2), so PRINT has no console to write to. The README had claimed "default console" since the early fork. A GUI compile that contains PRINT now emits a build-time warning with the statement count and the two fixes, so the output loss is no longer silent. #CONSOLE ON is this fork's extension - PB/Win 10 rejects it with Error 418 Statement expected - and --console still overrides the source.

  • Docs (README.md, ? shorthand): a bare ? maps to MSGBOX (GUI, same as PB/Win 10), #CONSOLE ON maps to CON.PRINT, #COMPILER PBCC to CON.PRINT and #COMPILER PBWIN to MSGBOX. The paragraph now states the measured PB/Win 10 subsystem (2), records that #CONSOLE ON fails there with Error 418, and removes the old claim that PRINT is redirected to pb_debug.log when no console exists - the text is discarded.
  • Compiler (pbcompiler/src/codegen.rs): Compiler counts PRINT statements compiled while console_mode is false (gui_print_count) and, after the per-function warning pass, prints [PB64Basic] WARNING: N PRINT statement(s) compiled into a Windows GUI EXE; there is no console to receive the output. Add "#CONSOLE ON" to the source (or pass --console) to link a console EXE.
  • Evidence (Windows, clang/MSVC, x86_64-pc-windows-msvc): plain.bas (no directive, one PRINT) -> warning printed once, PE subsystem 2, runs with exit 0; cons.bas (#CONSOLE ON) -> no warning, subsystem 3; plain.bas --console -> no warning, subsystem 3. PB/Win 10 10.04 on the same no-directive source -> subsystem 2; the same source with #CONSOLE ON -> Error 418 Statement expected on that line.
  • Test: examples/batch439_test.bas builds through #CONSOLE ON, obtains STD_OUTPUT_HANDLE and runs the PRINT path to completion (FAILURES: 0).