ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:atof

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
functions:atof [2017/04/17 15:17] korshunfunctions:atof [2017/04/17 15:33] (current) korshun
Line 8: Line 8:
 If s is too big or too small to fit into a fixed-point number, returns [[constants:INT_MAX]] with the sign of the input. If s is too big or too small to fit into a fixed-point number, returns [[constants:INT_MAX]] with the sign of the input.
  
-Supports [[:Number prefixes]].+Supports signs and [[:Number prefixes]].
  
 <note important>This function parses the fractional part only up to the amount of digits that can be stored in a fixed-point number. This means that numbers with very long fractional parts will not be fully parsed, e.g. ''%%"0.12345678901234567890thisisnotanumberanymore!@#$^#$^$*%^*$"%%'' will parse successfully. <note important>This function parses the fractional part only up to the amount of digits that can be stored in a fixed-point number. This means that numbers with very long fractional parts will not be fully parsed, e.g. ''%%"0.12345678901234567890thisisnotanumberanymore!@#$^#$^$*%^*$"%%'' will parse successfully.
 </note> </note>
 +
 +<note tip>To parse ints, use [[atoi]].</note>
 +
 +<note tip>For more flexibility in parsing and error handling, use [[ParseFixed]].</note>
  
 ===== Examples ===== ===== Examples =====
functions/atof.1492431438.txt.gz · Last modified: 2017/04/17 15:17 by korshun