Compartir a través de


FLOOR( ) Function

Returns the nearest integer that is less than or equal to the specified numeric expression.

FLOOR(nExpression)

Parameters

  • nExpression
    Specifies the numeric expression for which FLOOR( ) returns the nearest integer that is less than or equal to the numeric expression.

Return Value

Numeric

Example

STORE  10.9 TO gnNumber1
STORE -10.1 TO gnNumber2

CLEAR
? FLOOR(gnNumber1)  && Displays 10
? FLOOR(gnNumber2)  && Displays -11
? FLOOR(10.0)  && Displays 10
? FLOOR(-10.0)  && Displays -10

See Also

Reference

CEILING( ) Function

INT( ) Function

ROUND( ) Function

Other Resources

Functions

Language Reference (Visual FoxPro)