Numeric Operators - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

The following numeric operators act on two numeric values, producing a numeric result.

Operator Performs Example

+

addition

a + b

-

subtraction

a - b

*

multiplication

a * b

/

division

a / b

\

integer divide (drop remainder)

a \ b

Mod

remainder from integer division

a Mod b

^

exponentiation

a ^ b

Two of these operators are also used in other contexts. The plus sign acting on a pair of strings concatenates them into a new string value. The minus sign acting on a single number is a negation operator, producing a numeric result. The ampersand also performs string concatenation.

Operator Performs Example

-

numeric negation

- a

+

string concatenation

a + b

&

string concatenation

a & b