13175Re: ^!If Bug ?
- Jan 7, 2005--- In email@example.com, "John Mitchell" <notetab@l...>
> ; Start of clip -------first
> ^!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
> ^!If tests TRUE and the second tests FALSE, except when the firsttwo
> characters of the current paragraph are >>, in which case both testsobvious
> resolve to FALSE!!
> Am I about to be mightily embarrassed when someone points out an
> 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.
- << Previous post in topic Next post in topic >>