Top index Wirbel home

::int

int(float) - convert float to int
int(enum) - convert enum to internal integer representation
int(string) - convert int to int (no operation)

int(float) converts a float into an integer. No rounding takes place. The fractional part is simply dropped. If the float is larger then the maximum value of int, then the maximum value of int is returned. If the float is less than the minimum value of int, then the minimum value of int is returned.

int(enum) converts an enumeration atom to its internal integer representation. Please note, that the internal representation of an enumeration atom may change between two compilations of a program.

int(string) does nothing but returns the integer itself. It is useful for polymorphic programming.

See also

float