Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

UnRAR.ArchiveEntry.Operator_Compare

Andrew Lambert edited this page Nov 26, 2022 · 4 revisions

UnRAR.ArchiveEntry.Operator_Compare

Method Signature

Function Operator_Compare(OtherItem As UnRAR.ArchiveEntry) As Integer

Parameters

Name Type Comment
OtherItem ArchiveEntry The ArchiveEntry to compare Self against. May be Nil.

Return Value

Returns 0 if OtherItem refers to the same archive and index as the current instance, otherwise non-zero.

Notes

This is an operator overload method, which means that special calling syntax is used. To invoke the Operator_Compare method, use a comparison expression, e.g.:

    Dim rar As New UnRAR.Iterator(MyRarFile)
    If Not rar.MoveNext(UnRAR.RAR_TEST) Then MsgBox("Error")
    Dim r1 As UnRAR.ArchiveEntry = rar.CurrentItem
    If Not rar.MoveNext(UnRAR.RAR_TEST) Then MsgBox("Error")
    Dim r2 As UnRAR.ArchiveEntry = rar.CurrentItem
    If r1 = r2 Then ' invoke Operator_Compare
       MsgBox("Identical!")
    Else
       MsgBox("Different!")
    End If

Clone this wiki locally