Names
All object and attribute names in Action Scripts must follow the syntax:
However, UML names are not restricted and may contain any character. To use these names in Action Scripts apply backticks as follows:
Examples can be found in the table below. Consequently, the only characters not allowed in UML names used in Action Scripts are backticks (`).
UML Type | UML Name | Usage Example |
---|
Class attribute | strange name having blanks and dots: ... | object.`strange name having blanks and dots: ...`; |
Class attribute | a-b | object.`a-b`; |
Operation | ::my strange operation name:: | object.`::my strange operation name::`(); |
Parameter | äparam | set `äparam` = "test"; |
Object | a//b | create `a//b`; |
Object | 17_name | create `17_name`; |
Scripting Style
Operations can be scripted in an object-oriented or a procedural syntax style. The differences are shown in the table below, which provides some examples.
Object-Oriented Style | Procedural Style |
myVariable.exists(); | exists(myVariable); |
myDataItem.myAttr.exists(); | exists(myDataItem.myAttr); |
s.substring(0, 5); | substring(s, 0, 5); |
set aString = s.substring(0, 5).toUpper(); | set aString = toUpper(substring(s, 0, 5)); |
We recommend deciding for either of these alternatives to keep a clean scripting style throughout your project.
Case Sensitivity
All operations, statements, variable names, class names, and attribute names are case sensitive, e.g.
- The variables myVar and myvar are two different variables.
- The E2E Model Compiler will not recognize the assignment statement
Set
you need to write set
in lowercase instead.
Reserved Keywords
In Action Script Language, the following keywords should not be used as variable names as they are reserved for Action Script execution:
- and
- append
- apply
- array
- by
- catch
- create
- distinct
- each
- else
- errorCode
- errorType
- false
- first
- from
- group
- if
- last
- like
- local
- NULL
- or
- reduce
- select
- set
- single
- sort
- then
- to
- true
- unlike
- use
- using
- where