Metrohm tiamo 1.3 Manual User Manual
Page 62

36
General program functions
Operand1 Operand2 Result
Example
Remarks
0
converted to the type
Text
and each
non-empty character string is inter-
preted as
1
(true).
Time Text Number
Time(1999;10;7) AND
"Metrohm" --> 1
The same rules apply here as for the
previous operation.
OR
Syntax
Operand1 OR 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
1
1
0
1
0
0
0
Examples
Operand1 Operand2 Result
Example
Remarks
Operands of the same type:
Number Number Number
5 OR 4 --> 1
4 OR 0 --> 0
Numbers larger than 1 are auto-
matically interpreted as 1 (true).
Text Text Number
"Metrohm" OR "AG" --> 1
"" OR "Metrohm" --> 1
"" OR "" --> 0
An empty character string (
""
) is
interpreted as
0
(false), everything
else as
1
(true). This means that the
first operation corresponds to 1 OR
1 --> 1
Time Time Number
Time(1999;10;07) OR
Time(1964;02;03) --> 1
Time()
: see function Time(Date)
Operands of different types: the operand that does not correspond to the type of result is converted
to the particular result type before the operation.
Number Text
Number
1.2 OR "1.2" --> 1
0 OR "" --> 1
Before the operation an operand of
the type
Number
is converted to the
type
Text
, as the conversion from
Text
to
Number
makes no sense.
This means that in the 2
nd
operation
the 0 is converted to
"0"
, which cor-
responds to the logical value
1
(true)
as every non-empty character string
is interpreted as 1.
Text Number
Number
"Metrohm" OR 1.2 --> 1
The same rules apply here as for the
previous operation.