Comparison Operators

Comparison operators compare two expressions. The result is returned as a Boolean expression that determines if the comparison is True (-1) or False (0).

āļšāˇāļģāļš āļģāˇ“āļ­āˇ’āļē:


Result = Expression1 { = | < | > | <= | >= } Expression2

āļ´āļģāˇāļ¸āˇ’āļ­āˇ“āļąāˇŠ:

Result: Boolean expression that specifies the result of the comparison (True, or False)

Expression1, Expression2: āļ”āļļāļ§ āˇƒāļ¸āˇŠāļļāļąāˇŠāļ° āļšāļģāˇ“āļ¸āļ§ āļ…āˇ€āˇāˇŠâ€āļē āļ•āļąāˇāļ¸ āˇƒāļ‚āļ›āˇŠâ€āļēāˇāļ­āˇŠāļ¸āļš āļ´āˇŠâ€āļģāļšāˇāˇāļąāļēāļąāˇŠ.

āˇƒāˇāˇƒāˇāļŗāˇ”āļ¸āˇŠ āļ¸āˇ™āˇ„āˇ™āļēāˇ”āļ¸āˇŠāļšāˇāļģāļš

= : Equal to

< : āˇ€āļŠāˇ āļ…āļŊāˇŠāļ´āļ­āļģ

> : āˇ€āļŠāˇ āˇ€āˇ’āˇāˇāļŊāļ­āļģ

<= : āˇ€āļŠāˇ āļ…āļŊāˇŠāļ´āļ­āļģ āˇ„āˇ āˇƒāļ¸āˇāļą

>= : āˇ€āļŠāˇ āˇ€āˇ’āˇāˇāļŊāļ­āļģ āˇ„āˇ āˇƒāļ¸āˇāļą

<> : āļ…āˇƒāļ¸āˇāļą

āļ‹āļ¯āˇāˇ„āļģāļĢāļē:


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!