SHIP:Sail:ltoi

From Serious Documentation
Jump to: navigation, search
Function Returns Introduced Description
ltoi Integer v5.1.0 Explicitly casts a Long to an Integer

See Also:

Prototype

Integer ltoi(Long n);

Parameters/Return Value

Parameter Data Type Description
n Long the number to cast
Return Integer the integer version of the supplied number

Detailed Description

The ltoi() function explicitly casts the supplied Long to an Integer. You may want to use this in mathematical expressions around items to reduce precision and memory usage.

Examples

Example Result Notes
ltoi(-5); -5
ltoi(5); 5