diff --git a/src/common/basic/compiler.ts b/src/common/basic/compiler.ts index 9f9a8a05..ed2b02e9 100644 --- a/src/common/basic/compiler.ts +++ b/src/common/basic/compiler.ts @@ -1116,7 +1116,7 @@ export class BASICParser { for (var arrdim of arr.args) { if (arrdim.valtype != 'number') this.compileError(`Array dimensions must be numeric.`, arrdim.$loc); - if (isLiteral(arrdim) && arrdim.value < this.opts.defaultArrayBase) + if (isLiteral(arrdim) && typeof arrdim.value === 'number' && arrdim.value < this.opts.defaultArrayBase) this.compileError(`An array dimension cannot be less than ${this.opts.defaultArrayBase}.`, arrdim.$loc); } });