The parsed model retains BASIC locations for tracing, errors and debugger hooks. Runtime failures can be related to the original program rather than an intermediate generated form.
EXECUTION / COMMUNITY
Source
Execute MV BASIC directly from source with a fast edit-run-debug loop.
01 / DIRECT EXECUTION
Source stays close to the developer.
The Source provider reads MV BASIC directly from the catalogue and executes its parsed form. It is the shortest edit-run-debug path: no separate object needs to be built or deployed before a changed program or subroutine can run.
- 01FETCHResolve the catalogue source
RightMV resolves the requested program or subroutine in its account and file context. If no source exists, this provider declines the item so the configured execution chain can continue.
- 02PARSEBuild typed BASIC statements and expressions
The source parser turns lines, labels, statements and expressions into a typed program model with source locations. Parsed programs and inline actions are cached within configured bounds for a fast repeated-run cycle.
- 03EXECUTERun against the shared MV runtime
The interpreter walks the parsed model inside an ExecutionContext. File operations, locks, indexes, COMMON data, conversions and catalogue calls use the same runtime services available to the compiled execution methods.
02 / PROGRAMS AND SUBROUTINES
Direct does not mean isolated.
Programs run with normal command and catalogue context. Subroutines bind their arguments, execute the same source model and copy changed values back to the caller. Nested calls may cross execution methods without changing the application contract.
MV BASIC source
│
├─ parse + source locations
├─ ExecutionContext + shared COMMON
├─ files, locks, indexes, conversions
└─ result, output and argument copy-back03 / DEBUGGING AND CONTROL
A source-level safety net.
Source is commonly placed last in the execution order. Existing compiled forms get the first opportunity, while editable MV BASIC remains available when no suitable object or class can run.
OPTION BASIC.INTERPRETER.TRACE ON enables statement tracing for the current runtime context. It is an operational switch for focused diagnosis, independent of the environment logging setting.
MVDB_EXECUTION_ORDERjava,translator,mvb,sourcePlaces direct source execution after compiled methods while retaining it as the dependable source-level fallback.MVDB_NO_SOURCEemptyComma-separated deny list for items that must not use the Source provider.MVDB_BASIC_SOURCE_NO_CASE_STRINGStrueApplies MultiValue case-insensitive string comparison semantics in source execution.MVDB_BASIC_PROGRAM_CACHE_SIZE512Bounds the cache of parsed BASIC programs so frequently run source does not need to be reparsed.MVDB_BASIC_INLINE_CACHE_SIZE2048Bounds parsed inline statements used by runtime actions and expressions.MVDB_LOG_BASIC_SOURCEoffEnables source-engine diagnostics without changing program behaviour.