2 subtext, Subtext – Metrohm viva 1.1 User Manual

Page 84

Advertising
background image

2.3 Formula editor

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

72

■■■■■■■■

viva 1.1

NOTE

Entries of the Number type are always provided with a decimal place.

Example: TextPosition("12345";3) = invalid, as the 3 is converted to
3.0 before the operation and this is not included in the text.

Examples
TextPosition("Citric acid";"acid") = 8, the word "acid" occurs in the
text from index number 8 onwards

TextPosition("Citric acid";"Acid") = invalid, the word "Acid" (capital-
ized) does not occur in the text

TextPosition("Citric 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('SD.ID2';"Carbonate") = Index in which the word part
"Carbonate" begins for the first time in the ID2

2.3.4.8.2

SubText

Dialog window: Formula editor

Operators/Functions

Syntax
y = SubText(Text; Position; Length)

Returns that part of the text from Text which begins at the index Posi-
tion
and which has the length Length.

Parameters
Text

The parameter can be indicated either directly as text or as a variable of
the Text type. If the parameter does not correspond to the expected
type, it will automatically be converted to it. If this type conversion is not
possible, the result of this operation is returned 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 Number type. If
the parameter does not correspond to the expected type, it will automati-
cally be converted to it. If a type conversion is not possible or the position
does not exist, the result of this operation is returned as invalid.

Length

Advertising