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

Configurable Task variables

<Task loop>_STARTTHREAD

Configurable Task variable

Configurable Task variables

<Frame loop variable>_CURRENT

Dynamically created variable

Configurable Task variables

APPENDLOG

Constants

Constants

array

Data type

Field

ASSEMBLIES

Constants

Constants

boolean

Data type

Boolean value

const

Definition

Variables

culture

Data type

Culture

CURRENT_CULTURE

Constants

Constants

CURRENTFRAMELOOP

Constants

Constants

CURRENTTIME

Constants

Constants

do

Control statement

Loops

DOLOG

Constants

Constants

downto

Control statement

Loops

else

Control statement

Loops

boolean

Data type

Alternatives

elseif

Control statement

Alternatives

endfor

Control statement

Loops

endif

Control statement

Alternatives

endwhile

Control statement

Loops

EULER

Constants

Constants

FALSE

Logical value of the data type Boolean

Boolean value

FILETIME_ACCESSED

Constants of the functions GetFileTimestamp() and GetFileTimestamps()

Functions (alphabetical)

FILETIME_CREATED

Constants of the functions GetFileTimestamp() and GetFileTimestamps()

Functions (alphabetical)

FILETIME_INVALID

Constants of the functions GetFileTimestamp() and GetFileTimestamps()

Functions (alphabetical)

FILETIME_MODIFIED

Constants of the functions GetFileTimestamp() and GetFileTimestamps()

Functions (alphabetical)

float

Data type

Real number

for

Control statement

Loops

FRAMEPAUSE

Configurable Task variable

Configurable Task variables

FRAMETITLE

Constants

Constants

if

Control statement

Alternatives

integer

Data type

Integer

INVARIANT_CULTURE

Constants

Constants

LOGFILEDIR

Constants

Constants

map

Data type

Association

MAX_FLOAT

Constants

Constants

MAX_INTEGER

Constants

Constants

MAX_TIME

Constants

Constants

MIN_FLOAT

Constants

Constants

MIN_INTEGER

Constants

Constants

MIN_TIME

Constants

Constants

MISCDIR

Constants

Constants

NEWLINE_MAC

Constants

Variables

NEWLINE_UNIX

Constants

Variables

NEWLINE_WIN

Constants

Variables

NULL

Constants for the database value NULL

Working with NULL

NUMFRAMELOOPS

Constants

Constants

NUMRANDOMTEMPLATES

Constants

Constants

PI

Constants

Constants

private

Definition

Variables

PROJECTCREATOR

Constants

Constants

PROJECTDESCRIPTION

Constants

Constants

PROJECTDIR

Constants

Constants

PROJECTFILENAME

Constants

Constants

PROJECTNAME

Constants

Constants

PROJECTOUTPUTDIR

Constants

Constants

PROJECTTITLE

Constants

Constants

public

Definition

Variables

RANDOMSEED

Constants

Constants

RANDOMTEMPLATES

Constants

Constants

READ_BOOLEAN

Constants of function ReadLines()

Functions (alphabetical)

READ_FLOAT

Constants of function ReadLines()

Functions (alphabetical)

READ_INTEGER

Constants of function ReadLines()

Functions (alphabetical)

READ_STRING

Constants of function ReadLines()

Functions (alphabetical)

READ_TIME

Constants of function ReadLines()

Functions (alphabetical)

READXML_ATTR

Constants of function ReadXMLElements()

Functions (alphabetical)

READXML_TEXT

Constants of function ReadXMLElements()

Functions (alphabetical)

READXML_XML

Constants of function ReadXMLElements()

Functions (alphabetical)

repeat

Control statement

Loops

return

Control statement

The keyword return

STARTTIME

Configurable Task variable

Configurable Task variables

string

Data type

String

TASKCREATOR

Constants

Constants

TASKDESCRIPTION

Constants

Constants

TASKFILENAME

Constants

Constants

TASKNAME

Constants

Constants

TASKOUTPUTDIR

Configurable Task variable

Configurable Task variables

TASKTITLE

Constants

Constants

TEMPLATEDIR

Constants

Constants

TEMPLATEFILENAME

Constants

Constants

TEMPLATEPAUSE

Constants

Constants

then

Control statement

Alternatives

time

Data type

Time

to

Control statement

Loops

TRACELEVEL_DEBUG1

Constants of function Trace()

Functions (alphabetical)

TRACELEVEL_DEBUG2

Constants of function Trace()

Functions (alphabetical)

TRACELEVEL_DEBUG3

Constants of function Trace()

Functions (alphabetical)

TRACELEVEL_ERROR

Constants of function Trace()

Functions (alphabetical)

TRACELEVEL_FATAL

Reserved for future developments

---

TRACELEVEL_INFO

Constants of function Trace()

Functions (alphabetical)

TRACELEVEL_WARNING

Constants of function Trace()

Functions (alphabetical)

TRIM_BOTH

Constants of function Trim()

Functions (alphabetical)

TRIM_END

Constants of function Trim()

Functions (alphabetical)

TRIM_START

Constants of function Trim()

Functions (alphabetical)

TRUE

Logical value of the data type Boolean

Boolean value

TYPE_ARRAY

Constants of function IsOfType()

Functions (alphabetical)

TYPE_BOOLEAN

Constants of function IsOfType()

Functions (alphabetical)

TYPE_CULTURE

Constants of function IsOfType()

Functions (alphabetical)

TYPE_FLOAT

Constants of function IsOfType()

Functions (alphabetical)

TYPE_INTEGER

Constants of function IsOfType()

Functions (alphabetical)

TYPE_STRING

Constants of function IsOfType()

Functions (alphabetical)

TYPE_TIME

Constants of function IsOfType()

Functions (alphabetical)

until

Control statement

Loops

USECURRENTTIME

Configurable Task variable

Configurable Task variables

USEPROJECTTIMESETTINGS

Configurable Task variable

Configurable Task variables

USERDLL

Constants

Constants

USERFUNCDIRS

Constants

Constants

while

Control statement

Loops

WRITEXML_ATTR

Constants of function WriteXMLElements()

Functions (alphabetical)

WRITEXML_TEXT

Constants of function WriteXMLElements()

Functions (alphabetical)

WRITEXML_XML

Constants of function WriteXMLElements()

Functions (alphabetical)

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.