Collabora Office 24.04 Help
๋ ์์ ๋ ผ๋ฆฌ์ ์ผ๋ก ๊ฒฐํฉํฉ๋๋ค.
Result = Expression1 And Expression2
Result: ๊ฒฐํฉ ๊ฒฐ๊ณผ๋ฅผ ๊ธฐ๋กํ๋ ์์์ ์ซ์ ๋ณ์์ ๋๋ค.
Expression1, Expression2: ๊ฒฐํฉํ ์์์ ์์ ๋๋ค.
AND๋ก ๊ฒฐํฉ๋ ๋ถ๋ฆฌ์ธ ์์ ๋ ์์ด ๋ชจ๋ True๋ก ํ๊ฐ๋ ๊ฒฝ์ฐ์๋ง True ๊ฐ์ ๊ตฌํฉ๋๋ค.
True AND True๋ง True๋ฅผ ๊ตฌํ๋ฉฐ ๋ค๋ฅธ ๋ชจ๋ ๊ฒฐํฉ์ False๋ฅผ ๊ตฌํฉ๋๋ค.
๋ํ AND ์ฐ์ฐ์๋ ๋ ๊ฐ์ ์ซ์ ์์์ ๋์ผํ ์์น์ ์๋ ๋นํธ์ ๋นํธ ๋จ์ ๋น๊ต๋ฅผ ์ํํฉ๋๋ค.
Sub ExampleAnd
Dim A As Variant, B As Variant, C As Variant, D As Variant
Dim vVarOut As Variant
A = 10: B = 8: C = 6: D = Null
vVarOut = A > B And B > C REM returns -1
vVarOut = B > A And B > C REM returns 0
vVarOut = A > B And B > D REM returns 0
vVarOut = (B > D And B > A) REM returns 0
vVarOut = B And A REM returns 8 due to the bitwise AND combination of both arguments
End Sub