contents.gifindex.gifprev1.gifnext1.gif

\ Operator

Purpose

Used to divide two integers; returns an Integer or a Long.

Syntax

result = operand1 \ operand2

Notes

The operands can be any numeric expression. Before division is performed, the operands are rounded to Integer or Long expressions. Usually, the data type of result is an Integer, a Long, or a Variant of VarType 2 (Integer) or VarType 3 (Long) regardless of whether or not result is a whole number. Any fractional portion is truncated. However, if either operand is a Null, result is also a Null. An operand that is Empty (VarType 0) is treated as 0.

Example

This example divides 100,000 units among seven people using integer division and returns 14,285.

Y = 100000 \ 7