Newsgroups : Borland : borland.public.delphi.rtl.win32 : 2005 Dec : PosEx function seems to have changed between D7 and BDS2006

www.cryer.info
Managed Newsgroup Archive

PosEx function seems to have changed between D7 and BDS2006

Subject:PosEx function seems to have changed between D7 and BDS2006
Posted by:"Michal Borsuk" (michalbors..@__re_mo_ve__advancedcallmanager.com)
Date:Mon, 19 Dec 2005 00:20:16

Hello.

I have completed the upgrade from D7 to BDS2006 and the project I was
woking on (an HTML parser) suddenly started behaving strangely. I have
traced the bug down to PosEx.

Help states: "PosEx returns 0 if SubStr is not found, if Offset is
greater than the length of S, or if Offset is less than 1."

It seems that I had unconsciously made use of a possible bug in earlier
versions, that is the function returned a result even though Offset was
0. Now if the Offset is 0, PosEx returns 0, so if you've upgraded to
BDS2006, and something doesn't work, check your Offset value.


--
Michal Borsuk
Advanced Call Manager - a call register and manager.
http://www.advancedcallmanager.com/

Replies:

www.cryer.info
Managed Newsgroup Archive