Arithmetic formula, Table 22, Operators in arithmetic formulas – Vaisala Hydromet Data Collection Platform User Manual

Page 166

Advertising
background image

User’s Guide ______________________________________________________________________

164 __________________________________________________________________M210785EN-E

Arithmetic Formula

The arithmetic formula enables you to write simples formulas, such as
A + 1.2*B - C*D + 3.14. The formula can include four operands and a
set of operators or predefined functions. The supported operators are:
+,-,*,/,%,|,^,&,<<,>>,||,&&,==,!=,<,<=,>,>=. The operators are
described in

Table 22 on page 164

.

NOTE

The Unit string field entry will be used later in the AWS Client
software to display the unit of the sensor.

Table 22

Operators in Arithmetic Formulas

Operator

Description

+

Addition

-

Subtraction

*

Multiplication

/

Division

|

Bitwise-inclusive-OR

^

Bitwise-exclusive-OR

%

Calculates the integer remainder r of oper1/oper2 such
that oper1 = i * oper2 + r, where i is integer and r has
same sign as oper1, and the absolute value of r is less
than the absolute value of oper2 .

<<

Left-shift

>>

Right-shift

||

Logical-OR

&&

Logical-AND

==

Equality comparison

!=

Inequality comparison

<

Less than comparison

<=

Less than or equal comparison

>

More than comparison

>=

More than or equal comparison

Advertising