Skip to content
Discussion options

You must be logged in to vote

Yeah, these functions parse a 32-bit signed integer from a C-string.
The S32FromZ() is the more friendlier and easy to use version which, just calls the internal version to do the real work.
There is actually a problem with this function. It parses a 32-bit int but it cannot handle the sign of the number. It also does not handle overflow cases.

Anyways, user code should simply call S32FromZ(). In that function, it makes a copy of the string argument passed in. It passes this onto the internal version, it passes in the copy of the string argument by reference, this is mainly done so that the c-string is 'advanced' past whatever digit was parsed. This doesn't really mean much except that it…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by btgvesta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants