ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:parseint

This is an old revision of the document!


ParseInt

int, int ParseInt(str s, int base)

This function returns multiple values

Description

Parses s as an integer in the specified base. If base is 0, base 10 is used by default and Number prefixes are enabled. Supports signs.

Returns status and parsed number. Status is one of the following:

  • PARSENUMBER_SUCCESS – number successfully parsed. r2 contains the result.
  • PARSENUMBER_OVERFLOW – the number is too big to fit into a variable. r2 contains INT_MAX with the sign of the number.
  • PARSENUMBER_BADFORMAT – the number failed to parse. r2 is unchanged.
functions/parseint.1492432267.txt.gz · Last modified: 2017/04/17 15:31 by korshun