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

22912Re: StrPosRight bug in NTP 7.0?

Expand Messages
  • flo.gehrke
    Jul 6 5:01 AM
      --- In ntb-clips@yahoogroups.com, "anachromat" <tim.peters@...> wrote:
      >
      > Downloaded NTP 7.0 today, and some old clips went crazy. Tracked it down to this:
      >
      > H=bug
      > ^!Info ^$StrPosRight("X";"abcXdefXghi";False)$
      >
      > That displays 4 when I run it (the index of the leftmost X). I expected it to display 8 (the index of the rightmost X). In other words, StrPosRight is acting the same as StrPos now.


      Same bug in #^$StrPosMid$.

      Test:

      ^!Info ^$StrPosMid("X";"abcXdef";1;True)$
      ^!Info ^$StrPosMid("X";"abcXdef";2;True)$

      Different start positions are returning the same value. As Tim wrote, it behaves as ^$StrPos$ too.

      Regards,
      Flo

      NT 7.0 Pro Final Release
    • Show all 17 messages in this topic