VALUE1
\
VALUE2

The  operator performs integer division.

Parameters

This operator has two parameters:

The first numeric or text value.

value2 – The second numeric or text value.

Description

The  operator converts both operands into integers and then divides them. The result is also an integer. Here are some examples:

``````17 \ 5 ☞ 3
19 \ 5 ☞ 3
20 \ 4 ☞ 5
``````

Here are the same calculations using the regular division operator:

``````17 / 5 ☞ 3.4
19 / 5 ☞ 3.8
20 / 4 ☞ 5
``````

Note that because  is an integer operation, the result is truncated, not rounded. If you want to find out the remainder of an integer division use the mod function.

Note for C Programmers: The Panorama formula `x\y` is equivalent to the C expression `(long)x/(long)y`

Error Messages

Cannot divide text by a number – Both parameters to this operator must be numbers.

• - -- subtracts the numeric value on the right from the numeric value on the left.
• * -- multiplies the numeric value on the left by the numeric value on the right.
• / -- divides one numeric value by another.
• ^ -- raises a number to a power.
• + -- works differently depending on the type of operands used with it. If both operands are numeric, it does numerical addition. If either operand is text the + operator concatenates (joins together) the two operands.
• abs( -- calculates the absolute value of a number.
• ceil( -- converts a number to an integer, truncating toward positive infinity.
• divzero( -- divides two numbers, returns zero if denominator is zero.
• divzeroerror( -- divides two numbers, returns an error if the denominator is zero.
• fix( -- converts a number to an integer, truncating toward zero.
• fixed -- converts a floating point number to fixed point.
• float( -- converts a fixed point number to a floating point number.
• infinity( -- returns infinity.
• int( -- converts a number to an integer, truncating toward negative infinity.
• mod -- computes the remainder (modulo) after integer division.
• nan( -- checks to see if a numeric value is invalid.
• randominteger( -- generates a random integer between the starting and ending values.
• rnd( -- generates a random number between 0 and 1.
• round( -- rounds a number to a specified increment.
• validnumber( -- checks to see if a numeric value is valid.

History

 Version Status Notes 10.0 No Change Carried over from Panorama 6.0