Basic30 Language Reference
Int Function

Returns the integer portion of a number.

Int (expression)
expression
Required. A number or numeric expression

Requirements

  1. This function requires the link time library "libm.a".  It is a free download from the Microchip website.
  2. The flie <libs/math.bas> must be included in the Basic source to use this function.

Example

#include <libs/math.bas>

Dim a as Single
Dim i as Long

a=543.15
i=Int(a)   ' i is now 543

Also See: Float