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

Please support us!