2 subtext, Subtext – Metrohm tiamo 2.3 Patch 1 User Manual
Page 103
■■■■■■■■■■■■■■■■■■■■■■
2 General program functions
tiamo 2.3 Patch 1
■■■■■■■■
87
Note
Entries of the type Number are always provided with a decimal place.
Example: TexPosition("12345";3) = invalid, as the 3 is converted to
3.0 before the operation in 3.0 and this is not included in the text.
Examples
TextPosition("Citric acid";"acid") = 9, the word "acid" occurs in the
text from index number 9 onwards
TextPosition("Citric acid";"Acid") = invalid, the word "Acid" (capital-
ized) does not occur in the text
TextPosition("Citirc acid";"salt") = invalid, the word "salt" does not
occur in the text
TextPosition(Time(2004;05;05);"5") = 7
TextPosition(3362.14;"6") = 3
TextPosition('MV.ID2';"Carbonate") = Index in which the word part
"Carbonate" begins for the first time in the ID2
2.4.4.8.2
SubText
Dialog window: Formula editor
▶ Operators/Functions
Syntax
y = SubText(Text ; Position ; Length)
Gives that part of the text from Text which begins at the index Position
and which has the length Length.
Parameters
Text
The parameter can be indicated either directly as text or as a variable of
the type Text. If the parameter does not correspond to the expected
type, it will automatically be converted to this. If this type conversion is
not possible, the result of this operation is given as invalid.
Position
The numbering of the Position begins at 1. The parameter can be indica-
ted either directly as a number or as a variable of the type Number. If
the parameter does not correspond to the expected type, it will automati-
cally be converted to this. If a type conversion is not possible or the posi-
tion does not exist, the result of this operation is given as invalid.
Length