This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
functions:atof [2017/03/21 16:00] – created korshun | functions:atof [2017/04/17 15:33] (current) – korshun | ||
---|---|---|---|
Line 4: | Line 4: | ||
===== Description ===== | ===== Description ===== | ||
- | Returns s converted | + | Returns s parsed as a fixed-point number. If s cannot be parsed as a fixed-point number, returns 0. |
+ | |||
+ | If s is too big or too small to fit into a fixed-point number, returns [[constants: | ||
+ | |||
+ | Supports signs and [[:Number prefixes]]. | ||
+ | |||
+ | <note important> | ||
+ | </ | ||
+ | |||
+ | <note tip>To parse ints, use [[atoi]].</ | ||
+ | |||
+ | <note tip>For more flexibility in parsing and error handling, use [[ParseFixed]].</ | ||
+ | |||
+ | ===== Examples ===== | ||
+ | |||
+ | < | ||
+ | atof(" | ||
+ | atof(" | ||
+ | atof(" | ||
+ | atof(" | ||
+ | atof(" | ||
+ | atof(" | ||
+ | atof(" | ||
+ | </ | ||
- | See [[:Number parsing]] for features and examples. |