# COMPILER\_VERSION Macro
> [HTML Version](compiler_version_macro.htm)
_Added February 2015_
The compiler internally defines a macro symbol COMPILER\_VERSION to the compiler edit number, allowing you use it in a conditional compilation statement to avoid or warn about code that requires a minimum compiler version. For example:
\++IFNDEF COMPILER\_VERSION
++ERROR Compiler version too old (pre 711)
\++ENDIF
\++IF COMPILER\_VERSION >= 710
DEFTYPE BOOLEAN I,2
\++ENDIF
\++IF COMPILER\_VERSION < 728
? "Error ";err(0);
\++IFDEF ABC\_CURRENT\_ROUTINE\$
? " in routine ";ABC\_CURRENT\_ROUTINE\$
\++ELSE
? " at line #";err(1)
\++ENDIF
\++IFDEF COMPILER\_VERSION
++IF COMPILER\_VERSION >= 792 \! .LOCATION introduced in
? " location counter = "+.LOCATION \! compiler edit 792
++ENDIF
\++ENDIF
**Comments**
Unfortunately, since the COMPILER\_VERSION macro was introduced in edit 711, an attempt to reference its value in a prior version will generate a "conditional expression not constant" error, so that will only be useful going forward. However, you can use ++IFDEF to test if it's defined—and if not, you will know that it is prior to version 711.
Independent of, but related to, the concept of the minimum compiler version needed to compile a section of source code, is the minimum runtime version needed to execute it. This is not something you can test for or specify at compile time, but as of compiler version 896 (released with A-Shell 6.5.1657), the compiler automatically indicates the minimum runtime version needed (if it exceeds 6.5.1657) in the RUN header, based on the features used in the program. You can use VERSYS.LIT to display the minimum version, if applicable, for any RUN, LIT, or SBX program.
**History**
2014 October, A-Shell 6.1.1392, compiler edit 711: added to A-Shell