Integer

See Also: Type Conversion Functions, Integer, Number, Real, Round, String

Purpose

The Integer function returns a value of type Integer from an input of another type.

Return Type

Integer

Syntax

(Integer( {expression} ))

Where:

What It Does

The Integer function converts the {expression} into an integer. It eliminates the fractional portion (digits to the right of the decimal point) from the value of an expression.

String sValue

 

Move "-8.3782" to sValue

Move (Integer(sValue)) to iTabulation

In this example, the value -8 is moved to the variable iTabulation.

The Integer function does not change the type of the {expression}. It only affects the numeric precision to which {expression} is converted.

Notes

 

Number nResult nMean

Move (3.14 * Integer(nMean)) to nResult

This example would output 3.14 times the integer of the value of the number variable nMean to the number variable nResult in the full precision of number variables.