Difference between revisions of "SHIP:Sail:ltoi"

From Serious Documentation
Jump to: navigation, search
(Created page with "__NOTOC__ {{SailFuncTableStart|}}<onlyinclude> |{{SailFunc|ltoi}}||{{DataType|Integer}}||style="text-align:center;"|v5.1.0||Explicitly casts an {{DataType|Long}} to an {{DataT...")
 
Line 38: Line 38:
 
|<code>{{SailFunc|ltoi}}(5);</code> || 5 ||
 
|<code>{{SailFunc|ltoi}}(5);</code> || 5 ||
 
|}
 
|}
 +
 +
[[Category:Numeric Functions]]

Revision as of 15:12, 10 October 2016

Function Returns Introduced Description
ltoi Integer v5.1.0 Explicitly casts an Long to an Integer Badge SHIPv5.gif

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