Int PowerScript function
Description
Determines the largest whole number less than or equal to
a number.
Syntax
|
1 |
<span>Int</span> ( <span>n</span> <span></span>) |
|
Argument |
Description |
|---|---|
|
n |
The number for which you want the largest |
Return Values
Integer. Returns the largest whole number
less than or equal to n. If n is
too small or too large to be represented as an integer, Int returns
0. If n is null, Int returns null.
Usage
When the result for Int would be smaller
than -32768 or larger than 32767, Int returns 0 because the result
cannot be represented as an integer.
Examples
These statements return 3.0:
|
1 |
Int(3.2) |
|
1 |
<span>Int</span>(3.8) |
The following statements return -4.0:
|
1 |
Int(-3.2) |
|
1 |
<span>Int</span>(-3.8) |
These statements remove the decimal portion of the
variable and store the resulting integer in li_nbr:
|
1 |
integer li_nbr |
|
1 |
li_nbr = <span>Int</span>(3.2) // li_nbr = 3 |
See Also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest