Re: [Clip] IfSame
- Hi Wren,
>I did catch that IfSame wasI did not know that, thanks! I always wondered if we
>case insensitive while If is case sensitive, which I'm
>sure is why one wants to use IfSame.
could check case somehow like that.
If the two values represent numbers then they are compared as
numbers, otherwise they are compared as strings. String
comparison is case sensitive.
^!If "ABC" = "abc" Next else Skip
^!IfSame "ABC" "abc" Next else Skip
I thought this was the reason for the case difference, but after
reading Help maybe I am wrong. I will leave it as is though.
The reason ^!If is case sensitive is because it is actually doing
a mathematical comparison of the two sides. It is checking the
sum of the of the string's characters, their ASCII equivalent I
believe, and not the actual text itself.
So "A" and "a" would not equal each other because it would be
"41" and "61" in hex respectively. I don't know exactly what is
compared, but that is the gist of it.
I was in the habit of using ^!IfSame for text strings and ^!If
for number(s), but I see now the above will come in handy and
I'll keep to my same habit, but when I use text strings with ^!If
I will know that I am checking the case of the text.
(I was hoping one of the Clippers in the ClipClass would have
answered your post on the wizards since they understand them now.
Well, some of them would disagree with me on that statement. <g>)
Subscribe, UnSubscribe, Options