Skip to content

Arithmetic Operators

Paul Squires edited this page Sep 19, 2026 · 1 revision

Home › Operators › Arithmetic Operators

Arithmetic Operators

Operators that can be used in mathematical expressions

The mathematical operators perform mathematical operations with the values of their operands and return the results.

Operator + (Add)

Returns the result of an addition of two operands.

Operator - (Subtract)

Returns the result of a subtraction of two operands.

Operator * (Multiply)

Returns the result of a multiplication of two operands.

Operator / (Divide)

Returns the result of a division of two operands.

Operator \ (Integer Divide)

Returns the result of an integer divide of two operands.

Operator ^ (Exponentiate)

Returns the result of an exponentiation of two operands.

Operator Mod (Modulus)

Returns the result of a modulus of two operands.

Operator - (Negate)

Returns the result of a negation of an operand.

Operator Shl (Shift Left)

Returns the result of a bitwise shift left of an operand.

Operator Shr (Shift Right)

Returns the result of a bitwise shift right of an operand.


Category: Operators


Reproduced from the FreeBASIC Wiki Manual under the GNU Free Documentation License 1.3 — with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. Copyright © the FreeBASIC project and wiki contributors. See License.

Clone this wiki locally