0
我有一个hashset(posdata),pos数据包含一个布尔值和一个包含hashkey的标签。我需要绘制一个条件来检查两个或三个不同记录的布尔值是否等于false。如果条件为真,我想将两个或三个记录的布尔值设置为false。这是一种尝试,用于检查对象布尔值的逻辑
ElseIf (position.strLabel = "b2" And position.blnAvail <> False) And (position.strLabel = "b1" And position.blnAvail <> False) And (position.strLabel = "e1" And position.blnAvail <> False) Then
position.blnAvail = False ' trying to set the boolean to false
pos = position.strX & " " & position.strY
'position.blnAvail = False
count += 1
Bavailable = False'breaks out of the loop
啊所以这将检查是否所有三个布尔值为每个哈希代码是假的。那么如何将这些设置为false? – aspiringCoder 2012-03-07 15:12:26
不,这将检查您的'position.strLabel'是否包含输入if条件所需的任何字符串,从而简化条件。对于'position.blnAvail',你总是测试False。 – Steve 2012-03-07 15:23:19