#trunc(), #truncate()
DESCRIPTION
returns a number as an integer with its fractional part (if any) chopped off
SYNOPSIS
#trunc(n)
#truncate(n)
ARGUMENTS
n - a number, or numerical expression
EXAMPLES
# pikt +C 'output $text(#trunc(-3.75))'
-3
# pikt +C 'output $text(#trunc(-3.5))'
-3
# pikt +C 'output $text(#trunc(-3.25))'
-3
# pikt +C 'output $text(#trunc(3.25))'
3
# pikt +C 'output $text(#trunc(3.5))'
3
# pikt +C 'output $text(#trunc(3.75))'
3
isint(N) // is (N) an integer?
( (N) == #trunc((N)) )
rule // if exceeds threshold, and at least one level higher
// than before
if #la1 > 5.0
&& #trunc(#la1) > #trunc(%la1)
output mail $trim($inline)
=toptop(20)
endif
SEE ALSO
#ceiling()
#int(), #integer()
#round()
Numerical Functions
String Functions