Operators - logic – Metrohm tiamo 1.1 Manual User Manual
Page 65

Formula editor
37
Operators - Logic
AND
Syntax
Operand1 AND Operand2
The operands can either be entered directly or as a Variable and can be
of the type
Text
,
Number
or
Date/Time
. The result type is always a number (
1
= true,
0
= false). The following cases are possible:
Operand1
Operand2
Result
1
1
1
0
1
0
1
0
0
0
0
0
Examples
Operand1 Operand2 Result
Example
Remarks
Operands of the same type:
Number Number Number
5 AND 4 --> 1
4 AND 0 --> 0
Numbers larger than 0 are inter-
preted as
1
(true).
Text Text Number
"Metrohm" AND "AG" --> 1
"" AND "AG" --> 0
An empty character string (
""
) is
interpreted as
0
(false), every-
thing else as
1
(true). This
means that the first operation
corresponds to
1 AND 1 --> 1.
Time Time Number
Time(1999;10;07) AND
Time(1999;10;07) --> 1
Time()
: see function Time(Date)
Operands of different types:
Number Text
Number
1.2 AND "1.2" --> 1
0 AND "1" --> 1
0 AND "0" --> 1
0 AND "" --> 0
Before the operation an operand
of the type
Number
is converted
to the type
Text
, as the conver-
sion from
Text
to
Number
makes
no sense. This means that in the
2
nd
operation the 0 is converted
to
"0"
, which corresponds to the
logical value
1
(true) as every
non-empty character string is
interpreted as 1.
Text Number
Number
"Metrohm" AND 1.2 --> 1
The same rules apply here as for
the previous operation.
Number Time
Number
2.0 AND Time(1999;10;7) -->
1
0 AND Time(1999;10;07) --> 0
Before the operation an operand
of the type
Date/Time
is con-
verted to the type
Number
; all
dates from 30 December 1899
are interpreted as
1
(true).
Time Number
Number
Time(1999;10;7) AND 2.5 -->
1
The same rules apply here as for
the previous operation.