Please enable JavaScript to view this site.

A-Shell Development History

Compiler refinement (edit 748). MAP2+ statements are now flagged as illegal if not preceded by a finalized MAP1 statement. Unfortunately, AlphaBASIC does not make it clear when a MAP1 statement is finalized, other than by the next MAP1 statement. But it is never quite clear if there will be another MAP statement since they are technically legal anywhere in a program. In retrospect, the language could have used an "ENDMAP" statement, although you could effectively create your own just by defining a dummy MAP1 statement at the end of your last multi-level MAP structure.

The ambiguity didn't really have much significance in earlier versions of A-ShellBASIC, except perhaps in certain kinds of nested overlays, where one variable was overlaying another whose position was still in flux because it was part of a higher level array whose element members hadn't been finalized. But it became more of a problem with the introduction of the language features such as DEFSTRUCT, SIZEOF(VAR), .OFFSIZ(VAR), etc.

As of now, the rule is that any reference to a previous variable, except in a MAP statement initializer—and when the referenced variable has been finalized, causes the current MAP1 level to be finalized. If you attempt to follow that with a MAP2 or higher, it will be triggered as an illegal MAP level.

This may cause compile errors in programs that previously compiled, but it will prevent the kind of problem fixed in compiler edit 747 from escalating into a runtime problem. If you're not sure whether you've used the technique described, recompilation with this version or higher is highly recommended.