Integer (int)
All integer numbers. See Numbers for more information.
Returned by
Integer objects are returned by the following functions and methods:
get_option()array.length()bool.to_int()cfg_data.get()cfg_data.get_unquoted()compiler.alignment()compiler.compute_int()compiler.sizeof()runresult.returncode()str.to_int()
Integer methods
int.is_even()
Returns true if the number is even.
Signature
bool is_even()
int.is_odd()
Returns true if the number is odd
Signature
bool is_odd()
int.to_string()
Returns the value of the number as a string.
Signature
# Returns the value of the number as a string
str to_string(
int [fill], # Left fill the string with zeros until it reaches the length
)
Arguments
The method int.to_string() accepts the following positional arguments:
| Name | Type | Description | Tags |
|---|---|---|---|
fill |
int |
Left fill the string with zeros until it reaches the length
specified by this argument. A leading negative sign counts towards
the length, and is handled by inserting the padding after the |
[optional] |
The results of the search are