This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
number_parsing [2017/03/21 16:09] – korshun | number_parsing [2017/03/21 16:19] – korshun | ||
---|---|---|---|
Line 4: | Line 4: | ||
===== Simple functions ===== | ===== Simple functions ===== | ||
- | These simply return 0 on error: | + | These simply return 0 on error, b: |
* [[functions: | * [[functions: | ||
* [[functions: | * [[functions: | ||
+ | |||
+ | ==== Examples ==== | ||
< | < | ||
Line 20: | Line 22: | ||
Error statuses are: | Error statuses are: | ||
- | * PARSENUMBER_SUCCESS -- number successfully parsed, you can use the result | + | * '' |
- | * PARSENUMBER_OVERFLOW -- the number is too big to fit into a variable, the result will be either [[constants: | + | * '' |
- | * PARSENUMBER_BADFORMAT - the number could not be parsed at all. You **may not** use the result. '' | + | * '' |
+ | |||
+ | ==== Examples ==== | ||
+ | < | ||
+ | ParseInt(" | ||
+ | r1 -> PARSENUMBER_SUCCESS | ||
+ | r2 -> 123 | ||
+ | |||
+ | ParseInt(" | ||
+ | r1 -> PARSENUMBER_SUCCESS | ||
+ | r2 -> 8 | ||
+ | |||
+ | ParseInt(" |