Int64Static: Compare

Compare

Compares two Int64 values and returns a value indicating whether one is less than, equal to, or greater than the other.



 Public Function Compare(
	  ByRef a As Int64,
	  ByRef b As Int64 ) As Long

Parameters

a
[ByRef] Int64. The first Int64 to compare.
b
[ByRef] Int64. The second Int64 to compare.

Return Values

Long -  A signed integer that indicates the relative values of x and y, as shown in the following table.
Value Meaning
Less than zeroX is less than Y.
ZeroX equals Y.
Greater than zeroX is greater than Y.

Example

The following code illustrates comparing two 64-bit integer values.

    Public Sub Main()
        Dim x As Int64
        Dim y As Int64

        x = CInt64(1922)
        y = CInt64(400)

        Debug.Print Int64.Compare(x, y)  Displays 1
        Debug.Print Int64.Compare(x, x)  Displays 0
        Debug.Print Int64.Compare(y, x)  Displays -1
    End Sub
 

See Also

Project CorLib Overview

Class Int64Static Overview