Unicode Intrinsic Functions - Compare Method

Compare two strings

Member of Unicode Intrinsic Functions (PRIM_LIBI.IUnicodeIntrinsics)


Name Type Data Type Description
Result *Result (Optional) Enumeration Result of the comparison
To *Input Unicode String Value to be compared
CompareKind *Input (Optional) Enumeration Determines how the values are compared
IgnoreCase *Input (Optional) Boolean Ignore case when comparing the values


Compare two values to determine whether they are equivalent or different. This is useful for inbuilt sorting mechanisms as found in controls such as Tree and Tile where the sequence of data is defined by the user.
Possible results are as follows
Enum Value Description
Equal The values are the same
Greater The subject is greater than the target
Less The target is greater than the subject


Using the Compare intrinsic is the equivalent of writing the following
If (#Subject > #Object)
   #Result := Greater
   If (#Subject < #Object)
      #Result := Less
      #Result := Equal

See also

All Component Classes

Technical Reference

LANSA Version 15, April 2020