What's new in 3.0
Welcome to BASCOMP 3.0! This major release expands the supported BASIC language while improving parser robustness, runtime safety and QBasic-style source compatibility. Much code has been rewritten and all tool chain executables are now faster and more reliable.
The BASCOMP.BAS main compiler code was transformed to be in QB mode. This should provide for much better readibility. At the same time, documentation in BASCOMP and RUNTIME was updated.
Extended control statements
DO/LOOP is now supported, including WHILE and UNTIL conditions at either end of the loop. New exit statements include EXIT DO, EXIT WHILE, EXIT FOR and EXIT SELECT. ENDIF is accepted as an alternative spelling of END IF. FOR will accept variables as input for the main running variable as well as for STEP.
More stable boolean conditions
Boolean expressions now support nested parenthesized groups, repeated NOT, and combinations of AND and OR. TRUE and FALSE are also available as numeric constants.
Extended SELECT CASE
SELECT CASE now works with both numeric and string expressions. CASE clauses may contain multiple comma-separated alternatives, and CASE ELSE and EXIT SELECT are supported.
Improved arrays and strings
Numeric and dynamic string arrays can now be released with ERASE. Array allocation and replacement are safer, including automatic cleanup of previously allocated storage. String expressions and nested string functions have also received substantial parser and context-handling improvements.
Additional conversion functions
OCT$() and BIN$() complement the existing HEX$() function. ASC() now safely returns zero for an empty string, and the three-argument form of INSTR() correctly handles the full 16-bit start value.
See the wiki page for the complete list: https://github.com/tt1542/BASCOMP/wiki/Supported-functions-and-statements.