Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C++ can speed up native VFP strings command ?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00851950
Message ID:
00852422
Views:
7
Hi Garrett,

Finally you have comprised my spirit. Thanks.

I have put an example with a character, where the construction of a matching sequential machine is not necessary.

For 2 or more characters the comparison between OCCURS() and AT() depends on the type of strings,

because:

OCCURS() it counts all the contained strings, without superimposition
? OCCURS('AA','AAAAA')  && return 2
AT() it search the position of the contained strings, with superimposition
? AT('AA','AAAAA',1)    && return 1
? AT('AA','AAAAA',2)    && return 2
? AT('AA','AAAAA',3)    && return 3   <--- exist the 3° occurrence
? AT('AA','AAAAA',4)    && return 4   <--- exist the 4° occurrence
? AT('AA','AAAAA',5)    && return 0
Fabio
Previous
Reply
Map
View

Click here to load this message in the networking platform