Comparison Operators

Operatori usporedbe uspoređuju dva izraza. Rezultat se vraća kao Boolean izraz koji određuje da li je usporedba točna (-1) ili netočna (0).

Syntax:

Rezultat = Izraz1 { = | < | > | <= | >= } Izraz2

Parametri:

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

Expression1, Expression2: Any numeric values or strings that you want to compare.

Operatori usporedbe

= : Jednako

< : Manje od

> : Veće od

<= : Manje ili jednako

>= : Veće ili jednako

<> : Nije jednako

Primjer:

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