ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:atoi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
functions:atoi [2017/04/17 15:06] korshunfunctions:atoi [2017/04/17 15:32] korshun
Line 8: Line 8:
 If s is too big or too small to fit into int, returns [[constants:INT_MAX]] with the sign of the input. If s is too big or too small to fit into int, returns [[constants:INT_MAX]] with the sign of the input.
  
-Supports [[:Number prefixes]].+Supports signs and [[:Number prefixes]]. 
 + 
 +To parse fixed-point numbers, use [[atof]].
  
 ===== Examples ===== ===== Examples =====
Line 18: Line 20:
 atoi("not a number") -> 0 // Error atoi("not a number") -> 0 // Error
 atoi("1.3") -> 0 // Error atoi("1.3") -> 0 // Error
-<code>+atoi("0xff") -> 255 // Hexadecimal prefix 
 +</code>
  
  
functions/atoi.txt · Last modified: 2017/04/17 15:33 by korshun