StrFind() example incorrect

5 views
Skip to first unread message

Fred H Olson

unread,
Dec 26, 2020, 6:21:59 PM12/26/20
to Semware
I just noticed that the TSE Help example for StrFind() has the first
two parameters reversed from what they should be. Haystack should be
the second parameter.

> // last 6 digits could be any number
> string haystack[30] = "B0000123456.msg"
>
> if StrFind(haystack, "B0000.*\.msg", "x")
> ...

Fred

--
Fred H. Olson Minneapolis,MN 55411 USA (near north Mpls)
Email: fholson at cohousing.org 612-588-9532
My Link Pg: http://fholson.cohousing.org

Carlo

unread,
Dec 26, 2020, 6:41:43 PM12/26/20
to sem...@googlegroups.com

> I just noticed that the TSE Help example for StrFind() has the first two parameters reversed from what they should be. Haystack should be the second parameter.

But it is documented as being the second parameter.



Carlo Hogeveen

unread,
Dec 26, 2020, 7:10:16 PM12/26/20
to sem...@googlegroups.com

> > I just noticed that the TSE Help example for StrFind() has the first two parameters reversed from what they should be. Haystack should be the second parameter.

> But it is documented as being the second parameter.

Oops, my mistake, the definition is right, but, as you found, the example is wrong.



Reply all
Reply to author
Forward
0 new messages