beautypg.com

Rpbasic-52 programming guide – Remote Processing BASIC 52 User Manual

Page 68

background image

RPBASIC-52 PROGRAMMING GUIDE

2-49

INT

Syntax:

INT(expr)

Function:

Returns an in teger portion of expr

Mode:

Comm and, run

Use:

PRINT INT(PI)

Cards:

All

D E S C R IP T I ON

The integer p ortion is stored as a floating point numb er.

RELATED none

ERRORS

none

EXAMPLE

print int(45.67)
45

print int(-16.9999)
-16

To produce true rounding to the closest whole number, use the following formula:

A = INT(B+0.5)