Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] IfSame

Expand Messages
  • Jody
    Hi Wren, ... I did not know that, thanks! I always wondered if we could check case somehow like that. From Help: If the two values represent numbers then they
    Message 1 of 4 , Apr 29, 2000
    • 0 Attachment
      Hi Wren,

      >I did catch that IfSame was
      >case insensitive while If is case sensitive, which I'm
      >sure is why one wants to use IfSame.

      I did not know that, thanks! I always wondered if we
      could check case somehow like that.

      From Help:

      If the two values represent numbers then they are compared as
      numbers, otherwise they are compared as strings. String
      comparison is case sensitive.


      H=Check Case
      ^!If "ABC" = "abc" Next else Skip
      ^!Info If

      ^!IfSame "ABC" "abc" Next else Skip
      ^!Info IfSame

      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>)

      Happy Sclipt'n!
      Jody

      http://www.sureword.com/notetab

      Subscribe, UnSubscribe, Options
      mailto:Ntb-ClipClass-Subscribe@...
      mailto:Ntb-ClipClass-UnSubscribe@...
      http://www.egroups.com/list/ntb-clipclass
    Your message has been successfully submitted and would be delivered to recipients shortly.