#startdefine

Declares the scope of precompiler constant declarations (#define's)

#startdefine
  #define Constant {=Expression
  <Your code here>
#enddefine

Description

Use the #startdefine/#enddefine directives to explicitly define the scope of precompiler constant declarations. This is especially useful if you want to define a precompiler constant that is only applicable in a specific script module, such as a trigger, operation, or entity.

It is possible to nest #startdefine/#enddefine blocks.

For more information, see Scope of Constants.

Example: Using #startdefine

In the following example:

  1. An outer #startdefine block sets the scope the DEF1 declaration to two operations, myOper01 and myOper02.
  2. An inner #startdefine block sets the scope of the def2 declaration to the myOper02 operation.
;Script container
#startdefine  Callout 1
  #define DEF1 = value1
  operation myOper01
    ...
    if (something = <DEF1>)
      ...
    endif
  end
 
  #startdefine  Callout 2
  #define DEF2 =value2
  operation myOper02
    ...
    if (something = <DEF2>)
      ...
    endif
  end
  #enddefine    Callout 2
#enddefine    Callout 1
History

Version

Change

10.2.01

Introduced