INT: convert to integer(F)
⇒Home
⇒Contents
⇒more on Programming
⇒ Example of a INT call in "Loops/Break" (RosettaCode)
result = INT( x )
for
ABS
( x ) < 1, INT ( x ) has the value zero
result = INT( 0.99 )
! returns result = 0
for ABS( x ) ≥ 1, INT ( x ) is the integer whose magnitude is the largest integer that does not exceed the magnitude of x and whose sign is the same as the sign of x
result = INT( 3.99 )
! returns result = 3
result = INT( -3.99 )
! returns result = -3
see also
⇒ NINT
,
⇒ FLOOR
,
⇒ CEILING
How your donation will be used, and how to get a HicEst key code in return
©2000-2010 Georg Petrich, HicEst Instant Prototype Computing. All rights reserved.
Impressum