作者albb0920 (么柏)
看板Visual_Basic
标题Re: [VB6 ] 长久以来的疑惑
时间Tue Mar 11 01:10:54 2008
: 推 beyonds999:Integer 也是两个byte 03/10 19:28
那个比较有道理,我反而觉得C的int 跟 long 都 4 Bytes 极诡异
反正写VB因为Integer太小不会没顾虑到溢位
查了Wiki ,似乎Boolean就是Integer
Boolean constant True has numeric value -1 .
This is because the Boolean data type is stored as a 16-bit signed integer.
In this construct -1 evaluates to 16 binary 1s (the Boolean value True),
and 0 as 16 0s (the Boolean value False).
This is apparent when performing a Not operation on a 16 bit signed integer
value 0 which will return the integer value -1 , in other words
True = Not False. This inherent functionality becomes
especially useful when performing logical operations on the individual bits
of an integer such as And, Or, Xor and Not. This definition of True is also
consistent with BASIC since the early 1970s Microsoft BASIC implementation
and is also related to the characteristics of microprocessor instructions at
the time.
--
┬
██ ██ ██ ██◣ ████◣ ████◣ ◢███▍█ ┌┤
┼┼ ◥█ ██◤ ██ ██ ██ ██◣ ██ ██◣ ██▄▄▄▄ ┼┐
│ ◢█ ██◣ ██ ██ ██ ██ ██ ██ ▄▄▄▄██ ┌┤
┌┼ ██ ██ █████◤ █████◤ █████◤ █████◤ │
欢迎大家来
叉滴小站 开个人版喔 telnet://XDBBS.twbbs.org or telnet://ACGer.tw
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 59.112.40.3