small medium large xlarge

Generic-user-small
12 Jan 2017, 11:39
Renan Valentin Ferreira (1 post)

In Chapter 11. Strings and Binaries we have the Parse.exs that parses the character list representation of a decimal number.

Inside of the method _number_digits we have this operation value * 10 + digit - ?0 that prints 1, but when I tried to do the same thing on iex it prints -47:

0 * 10 + 1 - ?0 // -47

Why am I getting different results here?

You must be logged in to comment