Overview | Statement List


整型函数

Synopsis

INTF(arg)

Description

Returns the integer portion of the argument. The integer value is defined by truncating the decimal portion of the number.

Statement

Assigned Value

A=INTF(3.1)
or
A=INTF(4.9999)

A equals 3

A equals 4

NOTE: Because this function truncates the decimal part of a number, it rounds down. You can use this function to round to the nearest integer by adding an appropriate tolerance. The following are some examples of adding tolerances.

A=INTF(myreal + 1)
or
A=INTF(myreal + 1.0e-10)

 


Copyright ©2015 胡君NX二次开发官网(www.UGapi.com) QQ:85585969 All Rights Reserved.