Int: Difference between revisions
Jump to navigation
Jump to search
Created page with "INT(''number'') '''Description''' INT removes the fractional part of a number, returning the next smallest integer. The required parameter, ''number'', is any valid numeric ..." |
No edit summary |
||
Line 1: | Line 1: | ||
Int(''number'') | |||
== Description == | |||
Int removes the fractional part of a number, returning the next smallest integer. The required parameter, ''number'', is any valid numeric expression. | |||
== Example== | |||
<pre> | <pre> | ||
Rem Int Example | |||
' | 'Int converts floats to the next smallestint | ||
Dim Pos, Neg | |||
Pos = | Pos = Atn(1) * 4 | ||
Neg = -Pos | Neg = -Pos | ||
Print "Int(pi) = " & Int(Pos) | |||
Print "Int(-pi) = " & Int(Neg) | |||
</pre> | </pre> | ||
== Output == | |||
<pre> | <pre> | ||
Int(pi) = 3 | |||
Int(-pi) = -4 | |||
</pre> | </pre> | ||
== Related Items == | |||
[[fix|FIX]] | [[fix|FIX]] | ||
[[Category:Language Reference]] |
Revision as of 01:41, 17 August 2012
Int(number)
Description
Int removes the fractional part of a number, returning the next smallest integer. The required parameter, number, is any valid numeric expression.
Example
Rem Int Example 'Int converts floats to the next smallestint Dim Pos, Neg Pos = Atn(1) * 4 Neg = -Pos Print "Int(pi) = " & Int(Pos) Print "Int(-pi) = " & Int(Neg)
Output
Int(pi) = 3 Int(-pi) = -4