compareGtr

compareGtr(rhs:         Character;
           bIgnoreCase: Boolean;
           bUseLocale:  Boolean;
           locale:      Locale): Boolean;

The compareGtr method of the Character primitive type returns true if the receiver is greater than the value of the rhs parameter; otherwise, it returns false.

Parameters enable you to make the comparison case-sensitive or case-insensitive, and to use the sort order associated with a locale or the strict binary sort order. (These are the same comparison options that you can specify on dictionary keys.)

The relational binary comparison operator (>), documented in Chapter 1 of the JADE Developer’s Reference, uses a strict binary value comparison.

If the value of the bIgnoreCase parameter is false:

If the value of the bIgnoreCase parameter is true:

The code fragment in the following example shows the use of the compareGtr method.

vars
    locale : Locale;
begin
    write "a".compareGtr("c", false, false, null);          // Outputs false
    write "b".compareGtr("b", false, false, null);          // Outputs false
    write "c".compareGtr("a", false, false, null);          // Outputs true
// Comparisons with accented characters using binary and locale sort orders
    locale := currentSchema.getLocale("5129");
    write "à".compareGtr("z", false, false, null);          // Outputs true
    write "à".compareGtr("z", false, true, locale);         // Outputs false