Data types

String

Type identifier: string

The type string can store one or more characters. The maximum number of characters that can be stored in a string depends on the size of the system memory, but it can never exceed 2,147,483,647.

An index can be used to access individual characters contained in a string. The first element has the index 0:

string[0]

The index must be entered in square brackets after the identifier.

Tricentis TDM Studio saves characters internally using the code page UTF-16.

Supported operators:

Operator

Description

+

Concatenation. Adds the string on the right of the operator to the end of the string on the left of the operator.

Integer

Type identifier: integer

The type integer can store whole numbers in the range from ‑9,223,372,036,854,775,807 to 9,223,372,036,854,775,807. These values can be accessed by the constants MIN_INTEGER and MAX_INTEGER.

Supported operators:

Operator

Description

+

Addition

-

Subtraction

*

Multiplication

/

Division

%

Modulo

~

Binary negation

<<

Binary shift to the left

>>

Binary shift to the right

|

Bitwise conjunction with OR

&

Bitwise conjunction with AND

^

Bitwise conjunction with exclusive OR

Real number

Type identifier: float

The type float can store floating comma values in the range from ±5,0 * 10−324 to ±1,7 * 10308. This values can be accessed by the constants MIN_FLOAT and MAX_FLOAT. Since it is a floating comma type, it is accurate to a maximum of 16 digits.

Supported operators:

Operator

Description

+

Addition

-

Subtraction

*

Multiplication

/

Division

Boolean value

Type identifier: boolean

The type boolean can store logical values. It can only accept the values TRUE and FALSE.

Supported operators:

Operator

Description

!

Logical negation

||

Logical conjunction with OR

R

Multiplication

&&

Logical conjunction with AND

Time

Type identifier: time

The type time can store a time value consisting of a date and a time. Values can be in the range from 01/01/0001, 00:00:00 to 12/31/9999, 23:59:59 AD (Gregorian Calender). This values can be accessed by the constants MIN_TIME and MAX_TIME.

Time values In Tricentis TDM Studio have an internal resolution of 100 nanoseconds.

Supported operators:

Operator

Description

+

Addition

-

Subtraction

Field

Type identifier: array

The type array can store none, one or more elements of any kind. The maximum number of elements that can be stored in a field depends on the size of the system memory, but it can never exceed 2,147,483,647.

An index can be used to access individual elements contained in a field. The first element has the index 0:

field[0]

The index must be entered in square brackets after the identifier.

A field can also contain another field. These are referred to as multidimensional fields. Each dimension of a field must have its own index:

field[0][0]

Supported operators:

None.

Association

Type identifier: map

An association (also referred to as a dictionary) is similar to a field. The main difference lies in the fact that instead of a numerical index, any kind of data can be used to find a particular element. The maximum number of elements that can be stored in an association depends on the size of the system memory, but it can never exceed 2,147,483,647.

A key of any desired type can be used to access individual elements contained in a field.

assoc[123] assoc["Vorname"] assoc[PI / 2.0]

The key must be entered in square brackets after the identifier.

If a key does not yet exist in the dictionary, it is automatically generated when it is mapped to a value. If the key already exists, the value associated with it will be overwritten:

assoc["Vorname"] = "Maria";

In each case after the above mapping, the value “Maria” exists which can be retrieved with the key “First_name”:

string vorName = assoc["Vorname"];

If the specified key does not yet exist in the dictionary, then any reading of the value for this key (without explicit mapping) will generate an error.

Supported operators:

None.

Culture

Type identifier: culture

The type culture can store culture-specific information. These are used to format number and date values.

Supported operators:

None.