Robert Hodge
18-06-2013, 17:31
Presently, the IN function is defined as
n = In(ExpressionToCheck, Value1 [, Value2 [, Value...]])
where each expression is supposed to be numeric. The ExpressionToCheck is compared against the list of values, and if a match is found, an index to the matched value is returned, otherwise 0 if no match is found.
However, if you use strings as values, the function unconditionally returns 1.
It would be nice if this worked for strings.
It would be even nicer if there were some way to 'adjust' the comparison test, so you could say it was case insensitive, or ignored leading and trailing blanks, etc.
n = In(ExpressionToCheck, Value1 [, Value2 [, Value...]])
where each expression is supposed to be numeric. The ExpressionToCheck is compared against the list of values, and if a match is found, an index to the matched value is returned, otherwise 0 if no match is found.
However, if you use strings as values, the function unconditionally returns 1.
It would be nice if this worked for strings.
It would be even nicer if there were some way to 'adjust' the comparison test, so you could say it was case insensitive, or ignored leading and trailing blanks, etc.