Starting with ATEasy v5, support for conditional compilation was added.
The following predefined constants are defined to determine the ATEasy compiler version used:
v5 - ATEASY5
v6 - ATEASY5, ATEASY6
v7 - ATEASY5, ATEASY6, ATEASY7
v8 - ATEASY5, ATEASY6, ATEASY7, ATEASY8
v9 - ATEASY5, ATEASY6, ATEASY7, ATEASY8, ATEASY9
v10 (ATEasy X) - ATEASY5, ATEASY6, ATEASY7, ATEASY8, ATEASY 9 , ATEASY10
v11.0 (ATEasy 2021) - ATEASY5, ATEASY6, ATEASY7, ATEASY8, ATEASY 9 , ATEASY10, ATEASY11
v12.0 (ATEasy 2023) - ATEASY5, ATEASY6, ATEASY7, ATEASY8, ATEASY 9 , ATEASY10, ATEASY11, ATEASY12
v13.0 (ATEasy 2024) - ATEASY5, ATEASY6, ATEASY7, ATEASY8, ATEASY 9 , ATEASY10, ATEASY11, ATEASY12, ATEASY13
v14.0 (ATEasy 2025) - ATEASY5, ATEASY6, ATEASY7, ATEASY8, ATEASY 9 , ATEASY10, ATEASY11, ATEASY12, ATEASY13, ATEASY14
etc.
In ATEasy v11/2021, the following constants were added to determine if a 32-bit or 64-bit compiler was used:
AX86 - 32-bit IDE was used to compile the application.
AX64 - 64-bit IDE was used to compile the application.
To use the symbols, you need to use #ifdef statement which allows the conditional parsing/compilation. For Example, in our Profile driver OnResize() we have the following code:
#ifdef ATEASY6 ! support for ATEasy 5 and above
cbCount.Anchor=actrlAnchorTop or actrlAnchorLeft or actrlAnchorRight
btnChange.Anchor=actrlAnchorTop or actrlAnchorLeft or actrlAnchorRight
lblLabel.Anchor=actrlAnchorTop or actrlAnchorLeft or actrlAnchorRight
...
#else ! will not compile
cbCount.Move(x2, cbCount.Top, iAddButtonWidth, cbCount.Height)
btnChange.Move(x2+(iGap/2),btnChangeCount.Top,iAddButtonWidth-iGap,btnChangeCount.Height)
#endif
This example shows how to support new features in ATEasy 5 and beyond. In the above statement, if symbol ATEASY5 is defined, then the first block of code will be parsed, otherwise the second block will be parsed.
These symbols will be forward compatible; that is, ATEASY5 will be defined in ATEasy 6 and ATEASY5 and ATEASY6 will be defined in ATEasy version 7 and so on.
To define a user defined symbol, enter the symbol name in the Project Misc property page. If multiple symbols are required, separate them by commas.