ROUND

Previous  Next

 

int = ROUND( number AS REAL ) AS INTEGER

 


 

Returns the specified value to the nearest integer of a number

 

Example:

 

DIM a AS REAL

DIM i AS INTEGER

a = 123.456

i = ROUND( a )

IF i = INT( a + 0.5 ) THEN

  PRINT "This would be the correct answer !",

ENDIF