Skip to content

FerroBASIC 0.0.4 (pre-alpha)

Pre-release
Pre-release

Choose a tag to compare

@FeliceMente FeliceMente released this 27 Oct 08:21
· 300 commits to main since this release

Level 0 checked against B4J itself: every passing conformance test now matches an output recorded from B4J 10.70 (OpenJDK 19, Windows 10), and the compatibility report says how close FerroBASIC is.

Recorded from B4J:

  • The new recorder (tools/recorder) builds and runs each test with B4J and keeps its output. 95 tests pass against recordings, none against hand-derived outputs any more; 6 are documented deviations and 4 wait for the next recording run.

Language, as in B4J:

  • Names follow B4J's rules: a loop variable may have a Sub's name (and every use then calls the Sub), while a Dim or a typed For with a Sub's name is an error; a local Dim with a module variable's name and type is that variable; a parameter cannot hide a module variable.
  • A For with an undeclared counter, and For Each v As T, work in Process_Globals.
  • A comment may follow a line continuation.
  • Arithmetic in an operand of & ("x" & 1 + 2) asks for parentheses; a main module without Sub Process_Globals, or an array of 2 dimensions or more where a List is expected, is an error.
  • Const, x Is T, Wait For and inline Java get one precise error each.

Runtime, as in B4J:

  • Null as a String is the text "null"; records print a line break after every third field.
  • SortType takes the field from the first item; LastException is the innermost cause; changes through a stale SubList view raise UnsupportedOperationException (#21).

Testing and tools:

  • ferro-difftest runs the conformance tests in the interpreter or as standalone binaries and prints the compatibility report, by level and feature.
  • A real-world corpus of six open source B4J console projects, referenced by URL, commit, licence and SHA-256 (never copied) and fetched for its tests: every source round-trips through the lossless syntax tree.

Details in CHANGELOG.md; known differences from B4J (D1–D7) in docs/deviations.md.

Known limitations:

  • Const is not supported yet (#33).
  • Number literals with no leading digit (.08) are a syntax error.
  • Classes, other modules, libraries other than jCore, DateTime, Sleep and Wait For arrive at later levels.

Build from source with cargo build --release -p ferro-cli.