You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Compatible Unicode Intrinsic Functions - Compare Method
Compare two strings
Member of Compatible Unicode Intrinsic Functions (PRIM_LIBI.ICompatibleUnicodeIntrinsics)

Parameters

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

Details


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

Example


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

See also

All Component Classes
Technical Reference

  • No labels