为什么下面的结果是 34?它似乎与八进制数无关.
Why is it that following results in 34? It doesn't seem to have anything to do with octal numbers.
intval(042);
但是前导 0 在许多语言中确实表示八进制,就像这里的情况.
but a leading 0 does indicate octal in many languages, as is the case here.
这篇关于带前导零的 int 变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!