compare

Top  Previous  Next

This object can be used to compare two values, returning true or false (1 or 0, respectively) for each function.  It is used by the Image Manager for detection operation, and the object is available in each image manager job.

 

Methods

 

Equal(left$,right$) returns true of left$ and right$ are identical strings

NCEqual(left$,right$) returns true of left$ and right$ are identical case-insensitive strings ("dog" equals "Dog")

NumEqual(left$,right$) returns true of left$ and right$ are identical values when converted to numbers ("123.50" equals "123.5000")

NotEqual(left$,right$) returns true of left$ and right$ are not identical strings

NotNCEqual(left$,right$) returns true of left$ and right$ are not identical case-insensitive strings

NotNumEqual(left$,right$) returns true of left$ and right$ are not identical values when converted to numbers

Like(value$,wildcard$) returns true if value$ matches the wildcard, which uses * for any sequence of characters, and ? for any character ("Acme Inc" is like "*Inc")

NCLike(value$,wildcard$) returns true if value$ matches the wildcard, which uses * for any sequence of characters, and ? for any character, without regard to letter case

Match(value$,regex$) returns true of value$ matches the regular expression regex$ ("12/31/2018" matches "[01][0-9]/[01][0-0]/\d\d\d\d")

NCMatch(value$,regex$) returns true of value$ matches the regular expression regex$, without regard to letter case

LessThan(left$,right$) returns true of the left$ string is less than the right$ string, using character comparison ("abc" is less than "xyz")

NumLessThan(left$,right$) returns true of the left$ string is less than the right$ string, when converted to numbers ("999" is less than "1000")

GreaterThan(left$,right$) returns true of the left$ string is greater than the right$ string, using character comparison

NumGreaterThan(left$,right$) returns true of the left$ string is more than the right$ string, when converted to numbers

OneOf(left$,list$) returns true if left$ is found as a value in the comma-separated list$ ("CA" is one of "WA,OR,CA")

Contains(left$,right$) returns true if the value right$ is found anywhere in the value left$ ("PC Mac" contains "Mac" - and also contains "C")

NCContains(left$,right$) returns true if the value left$ is found anywhere in the value right$, without regard to letter case

IsDate(date$,format$) returns true if the date string is a valid date using the format specified, mdy, ymd, or dmy, indicating the order of date elements for month, day, and year.