- 论坛徽章:
- 95
|
原帖由 rt77789 于 2009-2-14 17:08 发表 ![]()
啊,我在大骆驼上看的。
你误解那里的讲解了。原话是这样:
If both operands arestrings (and have not been used as numbers since they were
set), the operators do bitwise operations between corresponding bits from the two
strings. In this case, there’s no arbitrary limit, since strings aren’t arbitrarily limited
in size. If one string is longer than the other, the shorter string is considered to
have a sufficient number of 0 bits on the end to make up the differ ence.
注意补的是 0 bit,而不是字符 '0';而且对于字符串,& 做的是 bitwise and。
[ 本帖最后由 MMMIX 于 2009-2-14 21:29 编辑 ] |
|