Option Compare statement (LotusScript® Language)

Specifies the method of string comparison.


Option Compare option1 [ , option2 ]


Option can be any of the following:


Comparison is bit-wise. If Binary is specified, no other option can be specified.

Case or NoCase

Comparison is case sensitive (default) or case insensitive. Only one of these options can be specified. The keyword Text is acceptable in place of NoCase.

Pitch or NoPitch

Comparison is pitch sensitive (default) or pitch insensitive. Only one of these options can be specified. These options apply to Asian (double byte) characters.


The Case, NoCase, Pitch, and NoPitch keywords specify string comparison using the character collation sequence determined by the IBM® software that you are using. The Binary keyword specifies string comparison in the platform's collation sequence: the effect is platform sort-order, case-sensitive, pitch-sensitive comparison.

Option Compare can be specified more than once per module, but the options cannot conflict. Option Compare can appear anywhere at module level. Option Compare applies to all string comparisons in the module. If you omit the Option Compare statement, the default method of string comparison is the same as Option Compare Case and Option Compare Pitch.

In certain functions such as InStr and StrCompare, the case and pitch sensitivity established by Option Compare or by default can be overridden by case-sensitivity and pitch-sensitivity arguments.