Basic EasyLanguage Question

theknifemac

Well-known member
Messages
340
Likes
0
Hi I am converting some EasyLanguage code and wanted to confirm the operation of the function IntPortion, does it always round down, i.e. is IntPortion(4.56) 4 rather than 5 ? The reference guide I have found so far on the web only gave an example where rounding could not have applied :eek: .

Cheers

Stew
 
theknifemac said:
Hi I am converting some EasyLanguage code and wanted to confirm the operation of the function IntPortion, does it always round down, i.e. is IntPortion(4.56) 4 rather than 5 ? The reference guide I have found so far on the web only gave an example where rounding could not have applied :eek: .

Cheers

Stew
Stew,

It does not "Round...up or down"....the Integer Portion is the 4. The decimal doesn't matter.
---------------------------------------------------------

IntPortion (Reserved Word)

Returns the integer portion of the specified number.

IntPortion(Num) ;

Where Num is a numeric expression representing the number for which you want the integer portion.

Examples

IntPortion(4.5) returns a value of 4.

IntPortion(-1.72) returns a value of -1.
----------------------------------------------------------------------

SpeedScalper
 
Last edited:
Top