Operators

From OpenOffice.org Wiki

Jump to: navigation, search
PAGE_TITLE: T3BlcmF0b3Jz
doc OOo

OpenOffice.org Basic understands common mathematical, logical, and comparison operators.

Mathematical Operators

Mathematical operators can be applied to all numbers types, whereas the + operator can also be used to link strings.

+Addition of numbers and date values, linking of strings
-Subtraction of numbers and date values
*Multiplication of numbers
/Division of numbers
\Division of numbers with a whole number result (rounded)
^Raising the power of numbers
MODmodulo operation (calculation of the rest of a division)

Logical Operators

Logical operators allow you to link elements according to the rules of Boolean algebra. If the operators are applied to Boolean values, the link provides the result required directly. If used in conjunction with integer and long integer values, the linking is done at the bit level.

ANDAnd linking
OROr linking
XORExclusive or linking
NOTNegation
EQVEquivalent test (both parts True or False)
IMPImplication (if the first expression is true, then the second must also be true)

Comparison Operators

Comparison operators can be applied to all elementary variable types (numbers, date details, strings, and Boolean values).

=Equality of numbers, date values and strings
<>Inequality of numbers, date values and strings
>Greater than check for numbers, date values and strings
>=Greater than or equal to check for numbers, date values and strings
<Less than check for numbers, date values and strings
<=Less than or equal to check for numbers, date values and strings
Image:documentation_note.pngOpenOffice.org Basic does not support the VBA Like comparison operator.
Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
Collection