Elements of the Syntax
Keywords
Keywords are reserved words which have a special meaning in Tricentis TDM Studio. The keywords used in Tricentis TDM Studio are summarized in the table below:
Keyword |
Context/Meaning |
See chapter |
---|---|---|
<Task loop>_NUMLOOPS |
Configurable Task variable |
|
<Task loop>_STARTTHREAD |
Configurable Task variable |
|
<Frame loop variable>_CURRENT |
Dynamically created variable |
|
APPENDLOG |
Constants |
|
array |
Data type |
|
ASSEMBLIES |
Constants |
|
boolean |
Data type |
|
const |
Definition |
|
culture |
Data type |
|
CURRENT_CULTURE |
Constants |
|
CURRENTFRAMELOOP |
Constants |
|
CURRENTTIME |
Constants |
|
do |
Control statement |
|
DOLOG |
Constants |
|
downto |
Control statement |
|
else |
Control statement |
|
boolean |
Data type |
|
elseif |
Control statement |
|
endfor |
Control statement |
|
endif |
Control statement |
|
endwhile |
Control statement |
|
EULER |
Constants |
|
FALSE |
Logical value of the data type Boolean |
|
FILETIME_ACCESSED |
Constants of the functions GetFileTimestamp() and GetFileTimestamps() |
|
FILETIME_CREATED |
Constants of the functions GetFileTimestamp() and GetFileTimestamps() |
|
FILETIME_INVALID |
Constants of the functions GetFileTimestamp() and GetFileTimestamps() |
|
FILETIME_MODIFIED |
Constants of the functions GetFileTimestamp() and GetFileTimestamps() |
|
float |
Data type |
|
for |
Control statement |
|
FRAMEPAUSE |
Configurable Task variable |
|
FRAMETITLE |
Constants |
|
if |
Control statement |
|
integer |
Data type |
|
INVARIANT_CULTURE |
Constants |
|
LOGFILEDIR |
Constants |
|
map |
Data type |
|
MAX_FLOAT |
Constants |
|
MAX_INTEGER |
Constants |
|
MAX_TIME |
Constants |
|
MIN_FLOAT |
Constants |
|
MIN_INTEGER |
Constants |
|
MIN_TIME |
Constants |
|
MISCDIR |
Constants |
|
NEWLINE_MAC |
Constants |
|
NEWLINE_UNIX |
Constants |
|
NEWLINE_WIN |
Constants |
|
NULL |
Constants for the database value NULL |
|
NUMFRAMELOOPS |
Constants |
|
NUMRANDOMTEMPLATES |
Constants |
|
PI |
Constants |
|
private |
Definition |
|
PROJECTCREATOR |
Constants |
|
PROJECTDESCRIPTION |
Constants |
|
PROJECTDIR |
Constants |
|
PROJECTFILENAME |
Constants |
|
PROJECTNAME |
Constants |
|
PROJECTOUTPUTDIR |
Constants |
|
PROJECTTITLE |
Constants |
|
public |
Definition |
|
RANDOMSEED |
Constants |
|
RANDOMTEMPLATES |
Constants |
|
READ_BOOLEAN |
Constants of function ReadLines() |
|
READ_FLOAT |
Constants of function ReadLines() |
|
READ_INTEGER |
Constants of function ReadLines() |
|
READ_STRING |
Constants of function ReadLines() |
|
READ_TIME |
Constants of function ReadLines() |
|
READXML_ATTR |
Constants of function ReadXMLElements() |
|
READXML_TEXT |
Constants of function ReadXMLElements() |
|
READXML_XML |
Constants of function ReadXMLElements() |
|
repeat |
Control statement |
|
return |
Control statement |
|
STARTTIME |
Configurable Task variable |
|
string |
Data type |
|
TASKCREATOR |
Constants |
|
TASKDESCRIPTION |
Constants |
|
TASKFILENAME |
Constants |
|
TASKNAME |
Constants |
|
TASKOUTPUTDIR |
Configurable Task variable |
|
TASKTITLE |
Constants |
|
TEMPLATEDIR |
Constants |
|
TEMPLATEFILENAME |
Constants |
|
TEMPLATEPAUSE |
Constants |
|
then |
Control statement |
|
time |
Data type |
|
to |
Control statement |
|
TRACELEVEL_DEBUG1 |
Constants of function Trace() |
|
TRACELEVEL_DEBUG2 |
Constants of function Trace() |
|
TRACELEVEL_DEBUG3 |
Constants of function Trace() |
|
TRACELEVEL_ERROR |
Constants of function Trace() |
|
TRACELEVEL_FATAL |
Reserved for future developments |
--- |
Constants of function Trace() |
||
TRACELEVEL_WARNING |
Constants of function Trace() |
|
TRIM_BOTH |
Constants of function Trim() |
|
TRIM_END |
Constants of function Trim() |
|
TRIM_START |
Constants of function Trim() |
|
TRUE |
Logical value of the data type Boolean |
|
TYPE_ARRAY |
Constants of function IsOfType() |
|
TYPE_BOOLEAN |
Constants of function IsOfType() |
|
TYPE_CULTURE |
Constants of function IsOfType() |
|
TYPE_FLOAT |
Constants of function IsOfType() |
|
TYPE_INTEGER |
Constants of function IsOfType() |
|
TYPE_STRING |
Constants of function IsOfType() |
|
TYPE_TIME |
Constants of function IsOfType() |
|
until |
Control statement |
|
USECURRENTTIME |
Configurable Task variable |
|
USEPROJECTTIMESETTINGS |
Configurable Task variable |
|
USERDLL |
Constants |
|
USERFUNCDIRS |
Constants |
|
while |
Control statement |
|
WRITEXML_ATTR |
Constants of function WriteXMLElements() |
|
WRITEXML_TEXT |
Constants of function WriteXMLElements() |
|
WRITEXML_XML |
Constants of function WriteXMLElements() |
Identifiers
Identifiers are the names of elements in a template. Every variable, constant, and function has an identifier which uniquely identifies them.
Identifiers can be freely chosen, but the following rules apply:
-
Identifiers may contain alphabetical letters (a - z), numbers (0 - 9) and underscores (_) in any order. Other characters can not be used.
-
Identifiers must not start with a numerical character.
-
Keywords can not be used as identifiers.
Identifiers are not case-sensitive. This means that Abc is the same as ABC or abc.
Variables
Variables are defined as follows:
Syntax: |
Operand [Operator Operand]...; |
Visibility
Either private or public.
If a variable is private, then it is only known within the template (or the project and task variables) in which it is defined. This means that no other template can access its contents.
If a variable is public, then it is not only known within the template (or the project and task variables) in which it is defined, but it can also be used by any other template.
If visibility is not set, then variables defined in the project and task variables are public. Variables defined in the templates are private.
const
Makes the variable read-only. Its content can not be changed and it therefore becomes a constant.
If const is set, [= Expression] must also be set.
Type
One of the keywords categorized as Data Type in the keywords table above.
Name
Any identifier which follows the rules described in chapter "Identifiers".
Expression
An initialization value. This is an expression as described in chapter "Expressions".
[]
Optional element.
A variable can be thought of as a container for a value which can be assigned a different value at any time. In other words, its content is variable.
A variable always has a particular data type and it can only store values of that type. For example, a variable of the type integer can only store numbers and never strings or time values.
When the content of a variable can not be changed, it is a constant.
Variables are assigned values using the following syntax:
Syntax: |
Variable = Expression; |
Variable
A previously defined variable.
Expression
Any expression, as described in chapter "Expressions".
Functions
Functions are pieces of programming code that can be executed from within templates. A function call has the following form:
Syntax: |
Name([Expression][, Expression]...); |
Name
An identifier which follows the rules described in chapter "Identifiers".
Expression
An initialization value. This is any kind of expression as described in chapter "Expressions".
If the function returns a value, then this can be assigned to a variable or the function itself can be used as an operand in an operation.
The arguments are evaluated from left to right. The sequence and types of arguments that are passed to a function must match the sequence and types in the definition of the function.
Expressions
Expressions have the following form:
Syntax: |
Operand [Operator Operand]...; |
Operand
A variable, constant or function.
Operator
One of the operators listed in the table "Operators".
[]
Optional elements.
...
Any number of repetitions of the preceding element.