Previous Topic: NEXT-INT-EQHINext Topic: NUMERIC


NEXT-INT-EQLO

Purpose

Returns the largest integer that is equal to or less than a numeric value.

Syntax

►►─┬─ NEXT-INT-EQLO ─┬─ ( value ) ────────────────────────────────────────────►◄
   ├─ NEXTINEL ──────┤
   └─ NEXIL ─────────┘

Parameters

value

Specifies the numeric value whose next integer equal or lower is calculated.

Value can be:

Example

In the following example, the next integer equal or lower function is used with the square root function to determine whether a number is the exact square of an integer value:

Initial value:
    WK-VALUE: 65
Statements:
    IF NEXIL(SQRT(WK-VALUE)) NE SQRT(WK-VALUE)
      THEN
        DISPLAY TEXT 'VALUE IS NOT AN EXACT SQUARE'.
Returned value from square root functions: 8.0632
Returned value from next integer function: 8