Lingo Dictionary > Symbols > / (division) |  |

/ (division)

Syntax

    expression1 / expression2

Description

Math operator; performs an arithmetic division on two numerical expressions, dividing `expression1` by `expression2`.`` If both expressions are integers, the quotient is an integer. If either or both expressions are floating-point numbers, the quotient is a floating-point number.

This is an arithmetic operator with a precedence level of 4.

Example

This statement divides the integer 22 by 7 and then displays the result in the Message window:

    put 22 / 7

The result is 3. Because both numbers in the division are integers, Lingo rounds the answer down to the nearest integer.

Example

This statement divides the floating-point number 22.0 by 7.0 and then displays the result in the Message window:

    put 22.0 / 7.0

The result is 3.1429, which is a floating-point number.