Please enable JavaScript to view this site.

A-Shell Development History

Navigation: Version 5.1/6.0, builds 1100-1271 > 1177 – 05 Apr 10

Compiler handling of auto-mapped variables

Scroll Prev Top Next More

Compiler enhancement (edit 452): To assist those want to use /M to identify any unmapped variables as errors (highly recommended to avoid bugs caused by mistyped variable names which are then auto-mapped if you don't use /M), actual map statements for the auto-mapped variables will now be appended to the bottom of the LSX file (generated with /LF). These auto-generated map statements may then be reviewed and copied back into the original program, so that it may be compiled with /M.

Obviously, if you perform this operation blindly, it doesn't buy you much since all of your misspelled and implicitly mapped variables will now simply become explicitly mapped. But the theory is that it will make it easier for you to review the auto-mapped variables for potential errors, perhaps by sorting them to locate variations of the same variable, or by looking them up in the original program to see whether the usage is valid. And from that point on, the ability to use /M will certainly save you time tracking down bugs in new development caused by typos in new variable names. If you tend to use the same common (and unmapped) variable names in many programs, you may want to move the generated map statements into a common ++INCLUDE module.

Note: in the case of implicitly mapped array variables, the array size in the LSX file will be left empty, leading to a compiler error if you try to compile without editing the MAP statement to specify the array size. This was a deliberate decision to force you to review such variables, since depending on the compiler's implicit rules for unmapped arrays seems like a particularly cordial invitation to chaos.