Comparison Operators
๋น๊ต ์ฐ์ฐ์๋ ๋ ์์ ๋น๊ตํฉ๋๋ค. ๊ฒฐ๊ณผ๋ ๋น๊ต๊ฐ True(-1) ๋๋ False(0)์ธ์ง ์ฌ๋ถ๋ฅผ ํ์ธํ๋ ๋ถ๋ฆฌ์ธ ์์ผ๋ก ๊ตฌํด์ง๋๋ค.
๊ตฌ๋ฌธ:
Result = Expression1 { = | < | > | <= | >= } Expression2
๋งค๊ฐ ๋ณ์:
Result: ๋น๊ต ๊ฒฐ๊ณผ(True ๋๋ False)๋ฅผ ์ง์ ํ๋ ๋ถ๋ฆฌ์ธ ์์ ๋๋ค.
Expression1, Expression2: ๋น๊ตํ ์์์ ์ซ์ ๊ฐ ๋๋ ๋ฌธ์์ด์ ๋๋ค.
๋น๊ต ์ฐ์ฐ์
= : ๊ฐ์
< : ๋ณด๋ค ์์
> : ๋ณด๋ค ํผ
<= : ์๊ฑฐ๋ ๊ฐ์
>= : ํฌ๊ฑฐ๋ ๊ฐ์
<> : ๊ฐ์ง ์์
์:
Sub ExampleUnequal
Dim sFile As String
DIM sRoot As String REM ' Root directory for file in and output
sRoot = "c:\"
sFile = Dir$( sRoot ,22)
If sFile <> "" Then
Do
MsgBox sFile
sFile = Dir$
Loop Until sFile = ""
End If
End Sub