_@STRCMP

_@STRCMP function is used in a Logic Template to compare two strings just as strcmp is used in the C programming language. The two strings are passed as arguments to the function. They are compared on a character by character basis.

Returns

Value

Description

0

The two strings are identical.

-1

The first string is shorter than the second string, but every character in the first string is an exact match to the corresponding character in the second string.

1

The second string is shorter than the first string, but every character in the second string is an exact match to the corresponding character in the first string.

-1

The strings do not match, and the first character within the first string not to match the corresponding character in the second string has a lower intrinsic value than the corresponding character in the second string.

1

The strings do not match, and the first character within the first string not to match the corresponding character in the second string has a higher intrinsic value than the corresponding character in the second string.

Format
_@STRCMP
( string_1, string_2 );

Argument

Description

string_1

The first string literal or the name of the first string data field to be tested.

string_2

The second string literal or the name of the second string data field to be tested.

Example
//Only display cities beginning with "M"

IF ( (0 <= _@STRCMP( City, "M" ) ) && (0 > _@STRCMP( City, "N" ) ) )

. . . . . . .

ENDIF