Rangecontains strange behavior

Does anyone else have this behavior:

message boolstr(rangecontains("ABCDEFG", "++"))

returns “true” (it should be false)?

I’ve discovered this behavior recently, in the midst of debugging several procedures. If I close all databases and create a new one, opening a new procedure, I still have the same result.

I’m using Mojave (10.14.5)

The Help file notes that the rangecontains( function is equivalent to using the stripchar( function:

Note: This function is equivalent to:


I believe that the stripchar( equivalent should actually be written:


since this is a text comparison and not a numeric comparison. So, for your example to work as expected you would substitute the corrected stripchar( function for the rangecontains( function:

boolstr(stripchar("ABCDEFG", "++")<>"")

That’s the fix. I’ve been staring at that too long today! Thank you.

Bottom line, there is a serious bug in the rangecontains( function.

I have fixed the bug in rangecontains(. The fix will be in the next release.

Advanced note: Researching this further, it appears that an earlier version of Panorama probably had this same bug. It was fixed, but the fix wasn’t really done quite the correct way. When I converted this custom function, the incorrectly done fix came back to bite me. If you have a copy of Panorama 6 handy, you can look up the rangecontains( function in the Custom Functions (ProVUE) wizard. You’ll see that the Body definition is wrong, but the Code is correct. Unfortunately, the Body definition is what got transferred to Panorama X. (The Code definition is never supposed to be edited manually, but apparently it was.)

Thank you, Jim!