Difference between revisions of "SHIP:Sail:ltoi"

From Serious Documentation
Jump to: navigation, search
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
{{SailFuncTableStart|}}<onlyinclude>
 
{{SailFuncTableStart|}}<onlyinclude>
|{{SailFunc|ltoi}}||{{DataType|Integer}}||style="text-align:center;"|v5.1.0||Explicitly casts an {{DataType|Long}} to an {{DataType|Integer}} {{v5}}</onlyinclude>
+
|{{SailFunc|ltoi}}||{{DataType|Integer}}||style="text-align:center;"|v5.1.0||Explicitly casts an {{DataType|Long}} to an {{DataType|Integer}}</onlyinclude>
 
|}
 
|}
 
== See Also: ==
 
== See Also: ==

Revision as of 10:09, 14 October 2016

Function Returns Introduced Description
ltoi Integer v5.1.0 Explicitly casts an 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