Each program written in CTL must contain the following parts:
ImportStatements VariableDeclarations FunctionDeclarations Statements Mappings
All of them may be interspersed, however, there are some principles that are valid for them:
If an import statement is defined, it must be situated at the beginning of the code.
Variables and functions must first be declared and only then they can be used.
Declarations of variables and functions, statements and mappings may also be mutually interspersed.
Important | |
---|---|
In CTL2 declaration of variables and functions may be in any place of the transformation code and may be preceded by other code. However, remember that each variable and each function must always be declared before it is used. This is one of the differences between the two versions of CloudConnect Transformation Language. (In CTL1 the order of code parts was fixed and could not be changed.) |