There are a variety of ways to compare two strings in CSPro logic. However, the way that strings are compared depends on the
logic version.
The original routine to
compare strings right-pads strings with space (blank) characters as necessary so that the length of the string does not factor into the comparison. This applies to comparisons using:
With logic version CSPro 8.0+, strings are compared without any padding. This is desirable for most strings, but when comparing strings against
alphanumeric dictionary items, which are right-padded to match the
dictionary item length, you will likely want to use the
strip function when comparing strings; for example:
if BIRD_NAME = "Bobolink" then // Original logic version
if strip(BIRD_NAME) = "Bobolink" then // CSPro 8.0+ logic version
The following table shows the results of string operations that are not impacted by padding and lead to the same result regardless of logic version.
The following table shows the results of string operations that are impacted by padding based on the logic version.