[英]What does the return value of an Access/VBA expression mean?
I have a huge expression for a textbox in the CONTROL SOURCE
. 对于
CONTROL SOURCE
的文本框,我有一个非常好的表达。 Sometimes it returns 0
and sometimes -1
, what do these values mean? 有时返回
0
,有时返回-1
,这些值是什么意思?
Read here http://msdn.microsoft.com/en-us/library/aa164500%28office.10%29.aspx 在这里阅读http://msdn.microsoft.com/en-us/library/aa164500%28office.10%29.aspx
The Boolean data type is a special case of an integer data type.
布尔数据类型是整数数据类型的特例。 The Boolean data type can contain True or False;
布尔数据类型可以包含True或False; internally, VBA stores the value of True as -1 , and the value of False as 0
在内部,VBA将True的值存储为-1 ,将False的值存储为0
VBA uses 0 for False and -1 for True. VBA使用0表示False,使用-1表示True。 (But generally a non-Null, non-zero value will be evaluated as True.) So it looks like your expression is returning a Boolean (True/False) value.
(但通常,非null,非零值将被评估为True。)因此,您的表达式似乎返回了布尔值(True / False)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.