Skip to content

FerroBASIC 0.0.5 (pre-alpha)

Pre-release
Pre-release

Choose a tag to compare

@FeliceMente FeliceMente released this 28 Oct 19:25
· 257 commits to main since this release

Const arrives, and M0 is complete: more of Level 0 is settled against B4J itself (recording runs 12 and 13, B4J 10.70, OpenJDK 19, Windows 10), and FerroBASIC now refuses, with a precise message, any shape B4J has not been recorded on.

Language, as in B4J:

  • Const declarations (#33): every form (Private Const, Public Const, Dim Const, several names, the value before As, lower-case const), of any type, with any value, in Process_Globals or in a Sub. Without As a constant is a String. As in B4J, these are errors: assigning a constant, an item of an array constant or a field of a record constant; a loop over an Int constant; a constant without a value, with bounds or not; a Dim in a Sub with a module constant's name. In Process_Globals, an Int declared by a Const and by a Dim, each with a literal value, builds in either order, each setting its value in turn.
  • A real literal may start with its decimal point (.08), as in a real-world B4J project; it is a Double.

Recorded from B4J:

  • Loops over a variable named like a Sub: FerroBASIC settles exactly the combinations B4J recorded. Some of the other ones were accepted before and are now refused as open until they are recorded (listed in CHANGELOG.md).
  • 142 conformance tests pass against recordings, 6 are documented deviations, and 27 pending probes wait for the next recording run.

Projects:

  • ferro-project reads a whole project (project file, .b4j.meta, local and |relative| modules, any letter case of a module's file name), and writes each file back byte for byte. ferro check, run and bundle still accept only a project with no module (Level 0).

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

Known limitations:

  • Const shapes B4J has not been recorded on (for example a Dim with no value after a constant, or assigning a variable declared both ways) are refused until recording run 14.
  • Classes, other modules, libraries other than jCore, DateTime, Sleep and Wait For arrive at later levels. The REPL and the Language Server are next (M1).

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