Strtok and/or instr

Richard Kreiss rkreiss at gccconsulting.net
Wed Dec 16 09:56:02 PST 2020


Field="Quick Brown Fox behind A tree"

QQ=instr(field,"B"); in this case QQ will equal "7" as the first B (Brown) is in the seventh position.  If qq=instr,"B","8") is the value of qq "17" which is the value from the starting position or 10 the value from the

Both these functions yield the first occurrence of a value. Instr(field,"A",{optional starting point]).  So, my question is if field has more than one iteration of "A", and the optional starting point is set past where "A" first appears in the 10th position.  Will the next iteration of "A" be at "10, which is the value formn where the search started?.

This would also be same thing for strtok() with regards to position of the value found.

Yes, I could test this out but I thought you all might want to thing about it as you might be using these functions and the manual is not clear on this subject except to indicate that one may need to move the starting point of the search forward of the point of the first occurrence if the value being searched for occurs more than once.


Richard Kreiss
GCC Consulting






-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 13896 bytes
Desc: not available
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20201216/4fae277c/attachment.bin>


More information about the Filepro-list mailing list