:IFVERS ... [:ELSEVERS] ... :ENDVERS
Use the :IFVERS, :ELSEVERS, and :ENDVERS script statements to define the beginning and end of pre-compiler instructions so that you can skip script blocks depending on the installed Automation Engine version. They allow you to keep initial data compatible when upgrading by using zero downtime.
Prerequisites and Context
Use these script statements in Automation Engine development environments.
Syntax
:IFVERS Version
[Statements]
[:ELSEVERS
[Other Statements]]
:ENDVERS
Parameters
| Parameter | Description | Format |
|---|---|---|
| Version |
Defines the AE version in Major[.Minor[.Patch]] format without quotes. Note: After starting this script statement with :IFVERS, you must indicate a condition that contains one of the following comparison operators:
|
Number |
| Statements | (Optional) Defines one or more statements that are executed if the version condition is "True". | Script statement |
| Other Statements | (Optional) Defines one or more statements that are executed when the version condition is "False". | Script statement |
Important Considerations
Key considerations include:
-
:IFVERS blocks cannot be nested.
-
If the version information does not comply with the version that is used, the statements are handled as comments.
Examples
The following example executes different script commands depending on whether the installed version is 21.0.4 or higher, or a lower version.
: IFVERS >= 21.0.4
!any script command
: ELSEVERS
!any other script command
: ENDVERS
See also: