标准函数isdigit()的返回值,有可能是非1且非0吗

【求助】标准函数isdigit()的返回值,有可能是非1且非0吗?
书上说,如果参数是数字字符的话,就是非0值。而且暗示可能不一定是1。
但是我试了十个数字字符,都是1。
书上为什么要这么说呢?是不是还有别的考虑?如果有,那是什么考虑呢?
书是:《the c programming language》
------解决方案--------------------
因为:
RETURN VALUE
       The values returned are non-zero if the character c falls into the tested class, and a zero value if not.
只要判断函数返回值是否为0就可以了。
------解决方案--------------------
引用:
引用:因为:
RETURN VALUE
       The values returned are non-zero if the character c falls into the tested class, and a zero value if not.
只要判断函数返回值是否为0就可以了。
书上是这么说的:
C/C+……


是的。你说的也有道理。有可能为非0的其他值。但
如果函数只返回1,也没有违背他的意思,这个需要看函数的实现了。
对于楼主来说,只要关注返回值是否为0就可以了。
------解决方案--------------------
楼主在咬文嚼字啊,我认为这种学习的态度是可取的,但有时不必过分纠缠,否则会影响学习进度,个人见解,欢迎拍砖
------解决方案--------------------
标准只规定了0和非0,那个非0,“恰好”很多实现都是1而已

完全可以有实现返回2,3等其他值

所以做判断的时候,只要判断0或者非0就好

如果直接判断==1,那么遇到别的实现(返回2的实现),你的代码就歇菜了

------解决方案--------------------
这个可以参考MSDN上面关于isdigit的一段解释:
The result of the test condition for the isdigit function depends on the LC_CTYPE category setting of the current locale; see setlocale for more information. For iswdigit, the result of the test condition is independent of locale.