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

13175Re: ^!If Bug ?

Expand Messages
  • abairheart
    Jan 7, 2005
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, "John Mitchell" <notetab@l...>
      wrote:
      > ; Start of clip -------
      > ^!Set %comment%=">>"
      > ^!Select paragraph
      > ^!Set %Str%=^$StrCopyLeft(^$GetSelection$;2)$
      > ^!If ^%Str%=^%comment% ^!Prompt ^%Str%=^%comment%
      > ^!If ^%comment%=^%Str% ^!Prompt ^%comment%=^%Str%
      > ; End of clip -------
      >
      > If I run it against an open document containing arbitrary text the
      first
      > ^!If tests TRUE and the second tests FALSE, except when the first
      two
      > characters of the current paragraph are >>, in which case both tests
      > resolve to FALSE!!
      >
      > Am I about to be mightily embarrassed when someone points out an
      obvious
      > explanation?


      Strings should be compared within quotes. IF this is a bug, it's that
      it did not generate an error. Unquoted text should evaluate as 0
      (zero) = false.

      The mystery is, what >>=xx evaluates to.

      Reporting a bug, when you're doing something that you shouldn't be
      doing is not kosher.

      Abair.
    • Show all 21 messages in this topic