Repository navigation
FerroBASIC 0.0.6 (pre-alpha)
Pre-release
Pre-release
Level 0 is now settled by B4J itself in many more corners: recording runs 14 to 20 (B4J 10.70, OpenJDK 19, Windows 10) answered 131 pending tests, and FerroBASIC follows every answer.
Language, as in B4J:
Select Case xis a synonym ofSelect x, andEachmay be a name.- An assignment to an undeclared name declares a
String; a Sub withoutAsreturns aString, soReturn <value>builds and its call has a value. Dim o As Objectwith no value gives a newjava.lang.Object(local, module variable, or aTypefield afterInitialize), compared by identity. Before, it wasNull(deviation D8, now gone).- A
For EachwithoutAsdeclares its variable anObject: over an undeclared name (a module variable inProcess_Globals) or over anyObject; over a variable of another type, or after an assignment or a read of the name, it is an error. - In
Process_Globals, the declaration pairs B4J builds (twoDims, aConstand aDim, twoIntConsts) are one variable; aForcounter declares anIntin source order; loops over a variable named like a Sub build wherever the variable's rules allow.
Runtime, as in B4J:
Forevaluates its step, limit and start in B4J's order;Selectevaluates everyCasevalue before comparing.<and>compare numbers, parsing aString; a number= NullraisesNumberFormatException; aCharcompared with a number takes the first character of its text.- A
Listused as aMapkey keys by its contents;GetTypeof a record is<package>.main$_<name>.
Some programs 0.0.5 accepted are now errors, as B4J refuses them (listed in CHANGELOG.md).
Recorded from B4J:
- 272 conformance tests pass against recordings, in the interpreter and as standalone binaries; 6 are documented deviations, and 2 pending probes wait for the next recording run.
Tools:
scripts/check-all.shruns every check before a push;ferro-comparechecks about 94,000 generated programs for what a change to the checker accepts or refuses.
Details in CHANGELOG.md; known differences from B4J (D1, D3–D7) in docs/deviations.md; open questions in docs/open-questions.md.
Known limitations:
- A
For Eachover anObjectthat holds a number stops with an internal error instead of a Java exception, and converting anObjectholding aListorNullto a number raises the wrong exception; both are next. - Classes, other modules, libraries other than jCore,
DateTime,SleepandWait Forarrive at later levels. The REPL and the Language Server are next (M1).
Build from source with cargo build --release -p ferro-cli.