Monday, August 30, 2010

Visual Basic Math Function : Int

Purpose : The Int function returns the largest integer that is less than or equal to then supplied numeric expression.

Syntax :
Int (numExpression )

numExpression : Numeric expression for which you want to return the largest integer less than or equal to it.

A% = Int ( -2.86 )
B% = Int ( 2.86 )

These statements place the value -3 in the variable A% and then value 2 in the variable B%

Value Int ( value )
2.7 2
2.2 2
2 2
-2 -2
-2.2 -2
-2.8 -.3

No comments:

Post a Comment