4 relational operators, 1 equal to, Equal to – Metrohm tiBase 1.1 User Manual

Page 49

Advertising
background image

■■■■■■■■■■■■■■■■■■■■■■

2 General program functions

tiBase 1.1

■■■■■■■■

41

Operand1

Operand2

Result

Example

Remark

Number

Number

Number

5 OR 4 --> 1

4 OR 0 --> 1

Numbers greater than 1 are automati-
cally interpreted as 1 (true)

Text

Text

Number

"Metrohm" OR "AG" --> 1

"" OR "Metrohm" --> 1

"" OR "" --> 0

An empty character string ("") is inter-
preted as 0 (false), everything else as 1
(true). The first operation therefore cor-
responds to 1 OR 1 --> 1

Time

Time

Number

Time(1999;10;07) OR
Time(1964;02;03) --> 1

Time(): see Time(Date)

Operand of different type: The operand which does not correspond to the result type is converted to the relevant
result type before the operation.

Number

Text

Number

1.2 OR "1.2" --> 1

0 OR "" --> 1

Before the operation, the operand of
the type Number is converted to the
type Text, as a conversion from Text to
Number is not advisable. During the
second operation, the 0 is therefore
converted to "0", which corresponds to
the logical value 1 (true), as every char-
acter string that is not empty is interpre-
ted as 1.

Text

Number

Number

"Metrohm" OR 1.2 --> 1

The same rules apply here as for the pre-
vious operation.

Number

Time

Number

2.0 OR Time(1999;10;7) --> 1

0 OR Time(1964;02;03) --> 1

Before the operation, the operand of
the type Date/Time is converted to
Number and all data from December
30, 1899 are interpreted as 1 (true).

Time

Number

Number

Time(1999;10;7) OR 2.5 --> 1

The same rules apply here as for the pre-
vious operation.

Text

Time

Number

"Metrohm" OR
Time(1999;10;7) --> 1

Before execution of the operation, the
operand of the type Date/Time is con-
verted to the type Text and every char-
acter string that is not empty is interpre-
ted as 1 (true).

Time

Text

Number

Time(1999;10;7) OR
"Metrohm" --> 1

The same rules apply here as for the pre-
vious operation.

2.4.4.4

Relational operators

2.4.4.4.1

Equal to

Dialog window: Formula editor

Operators/Functions

Syntax
Operand1 = Operand2

Advertising