equal()

Synopsis

Takes two arguments of any type, and returns True if they are equal. Names are converted to strings automatically; string comparison is case-insensitive.

Syntax

Equal ( var1 As Any, 
        var2 As Any ) As Boolean
Argument Type Description
var1 Any First argument; this argument is permitted to be NoValue .
var2 Any Second argument; this argument is permitted to be NoValue .

Example 1

Compare two integers
Intent >equal(1, 2) 
--> False

Example 2

Compare a Number and an Integer
Intent >equal(1.0, 1)
--> True

Example 3

Compare lists
Intent >equal({1, 2, 3, 4}, {1, 2, 3, 4}) 
--> True

Example 4

Compare lists
Intent >equal({1, 2, 3, 4}, {1, 2, 3, 5}) 
--> False

Example 5

Compare strings (case insensitive)
Intent >Equal("asdf", "Asdf")
--> True

Example 6

Compare strings
Intent >Equal("asdf", "asdg") 
--> False 

Example 7

Compare a Name and a String ; names are converted to strings for comparison.
Intent >Equal("asdf", :asdf)
--> True