Miscellaneous functions – Metrohm tiamo 1.2 Manual Benutzerhandbuch

Seite 80

Advertising
background image

54

General program functions

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

Miscellaneous functions

Case

Syntax

y = Case(condition ; Value_true ; Value_false)

y = Case(condition ; Value_true ; Value_false ; Value_error)

Returns

Value_true

if the condition is true. Otherwise

Value_false

will be re-

turned. If an error occurs in the condition (Result "

invalid

") then

Value_error

will be returned.

Parameters

Condition

Number

Any Variable (type

numb

er) can be entered here, or a Compare or logic op-

eration can be carried out whose operators are either adopted directly or
transferred as a Variable. This could be of the type

Text

,

Number

or

Date/Time

(

Time()

).


Value_true

If the Condition <> 0 then this parameter will be saved as the result of the
function.

Advertising