:IFVERS [:ELSEVERS] :ENDVERS

The :IFVERS, :ELSEVERS, and :ENDVERS script statements allow you to define the beginning and end of pre-compiler instructions so that you can skip script blocks depending on the installed Automation Engine version. Use these script statements in Automation Engine development environments. They allow you to keep initial data compatible when upgrading by using zero downtime.

Note: :IFVERS blocks cannot be nested.

Syntax

:IFVERS Version
[Statements]
[:ELSEVERS
[Other Statements]]
:ENDVERS

Parameters

  • :IFVERS
    Begins the pre-compiler instructions for skipping script blocks depending on the installed Automation Engine version.
    After starting this script statement with :IFVERS, you must indicate a condition that contains one of the following comparison operators:
    • =
      The expression is "True" if at least one of the comparison values equals the Version
    • <>
      The expression is "True" if none of the comparison values equals the Version.
    • <, >, <=, <=
      This expression is "True" if one comparison value corresponds to the defined condition.
  • Version
    AE version
    Note: If the version information does not comply with the version that is used, the statements are handled as comments.
    Format:
    Major[.Minor[.Patch]] without quotes
  • Statements
    (Optional) Defines one or more statements that are executed if the version condition is "True".
    Format: script statement
  • :ELSEVERS
    (Optional) Begins the section for Other Statements
  • Other Statements
    Defines one or more statements that are executed when the version condition is "False".
    Format: script statement
  • :ENDVERS
    Ends the pre-compiler instructions

Example

: IFVERS >= 21.0.4
!any script command
: ELSEVERS
!any other script command
: ENDVERS

See also: