Metrohm tiamo 1.0 Manual User Manual
Page 75

Formula editor
51
Position
The numbering of the
Position
starts at 1. The parameter can either be en-
tered directly as a number or as a Variable of the type
Number
. If the pa-
rameter does not correspond to the expected type then it will be automati-
cally converted to it (see Type conversion "TextToNumber"). If the type con-
version is not possible or if the position does not exist then the result of this
operation will be returned as "
invalid
".
Length
The parameter can either be entered directly as number or as a Variable
of the type
Number
. If the parameter does not correspond to the expected
type then it will be automatically converted to it (see Type conversion
"TextToNumber"). If the type conversion is not possible or if the length given
here is longer than the length of the subtext then "
invalid
" will be returned
Examples
SubText("Citric acid";9;5) = acidic
SubText("Citric acid";9;6) = invalid
, from the position 9 only five characters
are present
SubText('MV.ID2';1;3)
= the first three characters of the identification 2
Trim
Syntax
y = Trim(Text)
Returns the
Text
without any empty spaces in front of it or behind it.
y = Trim(Text ; Sample text)
Returns the
Text
without
Sample text
.
Parameter
Text
The parameter can either be entered directly or as a Variable of the type
Text
,
Number
or
Date/Time
.
Sample text
The parameter can either be entered directly or as a Variable of the type
Text
,
Number
or
Date/Time
. If the types of the two parameters are not identi-
cal then the type
Sample text
will always be converted to the type
Text
(see
Functions - Type conversion).
Note
Entries of the type
Number
are always given with one decimal place.
Example:
TextPosition("12345";3) = invalid
, as before the operation the 3 is con-
verted to 3.0 and this is not contained in the text.
Examples
Trim(" Citric acid ") = "Citric acid"
Trim("Citric acid";"acid") = lemons
Trim("Citric acid";"salt") = Citric acid