Uranuz:

But I don't understand why in expression where both of arguments have type char:
        return c - '0';
I have resulting type int. It's very strange for me and looks very buggy)

In D operations among chars return a int. The same happens in C/C++.

If you subtract a char from a char in general you can have a negative result, that can't fit in a char. So what's buggy is your thinking.

Bye,
bearophile

Reply via email to