Contents | Prev | Next

8.2.2.8 Integer division (div)

Description

The div operator takes two operands of integral type, performs integral division, and the result is a value of integral type.

Example

Here are some examples using the div operator to perform division:

   5 div 2       which results in the real value 2
   -5 div 2     which results in the real value -2
   5 div -2     which results in the real value -2
   -5 div -2    which results in the real value 2

Contents | Prev | Next