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