Written Feburary 2025
_MIN_RUN_VER
This special symbol may be defined to override the minimum runtime version field placed into the RUN file header, which is normally based purely on the range of language constructs referenced in the source code. For example, if your program contains a system function that normally requires a runtime version of 7.0.1767, but you want to be able to run the program in older versions 6.4.1580+, using runtime logic to avoid hitting the unsupported code, you can either add the following definition to the program:
DEFINE _MIN_RUN_VER = 1580
or compile the program with definition on the command line, e.g.:
.COMPIL myprog/C:_MIN_RUN_VER=1580
Background
Normally the compiler will automatically plug in the minimum run version value based on the language features used in the program. The RUN interpreter will compare that value to the current runtime version, and if not sufficient, will abort with an explicit complaint -- "Program requires minimum A-Shell level ####". This is deemed preferable to getting some cryptic error, such as #34 (Invalid Syntax Code) when the intepreter encounters the unrecognized code. However, there may be times where you know better than the compiler. For example, your program may check the version at runtime and avoid code that requires a later version, in which case you might want to override the minimum version in the header to allow it to run on earlier versions anyway. Or, in the case of embedded defstructs, if you distribute RUN programs across older 64 bit A-Shell versions, you may want to force the minimum run version to 1767, to avoid wasting time later trying to figure out why embedded defstructs aren't working.
History
2025 January, A-Shell 7.0.1767, compiler edit 1053: Function added to A-Shell.
_NO_MIN_1767
This special symbol may be defined (as 1) to prevent the compiler from setting the minimum runtime version field in the RUN file header to 1767 for any program containing embedded DEFSTRUCTs. This is safe and only makes sense when compiling and running under the same (32 vs 64 bit) architecture, allowing programs compiled under compiler edit 1057+ to be run under A-Shell versions prior to 7.0.1767. For example:
DEFINE _NO_MIN_1767 = 1
or:
.COMPIL myprog/C:_NO_MIN_1767=1
History
2025 January, A-Shell 7.0.1768, compiler edit 1057: Function added to A-Shell.