:IFVERS [:ELSEVERS] :ENDVERS
Script statements: Pre-compiler instructions for skipping script blocks depending on the installed Automation Engine version.
Syntax
:IFVERS Version
[Statements]
[:ELSEVERS
[Other Statements]]
:ENDVERS
Syntax |
Description/Format |
---|---|
Version |
AE version Format: Major[.Minor[.Patch]] without quotes |
Statements |
One or more statements that will be executed when the version condition is "True". Format: script statement |
Other Statements |
One or more statements that will be executed when the version condition is "False". Format: script statement |
Comments
This script statement was originally introduced to be able to keep initial data objects compatible, during an upgrade scenario with zero downtime.
The primary UseCase for this statement is the Automic developing environment.
:IFVERS blocks cannot be nested.
These statements will be automatically treated as comments, if the version information should not fit the one used.
Comparison operators
A condition contains one of the following comparison operators:
Operator |
Rule |
---|---|
= |
This expression is "True" if at least one of the comparison values equals the Value. |
<> | This expression is "True" when none of the comparison values equals the Value. |
< > <= >= |
This expression is "True" if one comparison value corresponds to the defined condition. |
Example
: IFVERS >= 11.2
!any script command
: ELSEVERS
!any other script command
: ENDVERS
See also:
Script element | Description |
---|---|
Branching under certain conditions. |
|
:SWITCH... :CASE... :ENDSWITCH | It verifies whether the value of a variable complies with certain values and depending on the result, it runs various statements. |
Script Elements - Read or Modify Objects
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function