Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memo fields
Message
From
11/08/2005 10:40:13
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01039914
Message ID:
01040244
Views:
17
I have found that when using the ALINES() function to move the contents to an array, the type of search required may not be suitable for ASCAN(). The search may require that the text searched for be located anywhere in the text string, hence, ATC("TextToSearchFor",lcLines[lnNdx])>0 provides a better search (with a FOR loop to process the entire text buffer). ASCAN would require that the "TextToSearchFor" be located at the beginning of the text string to match (and is case sensitive).

An example:

DIMENSION lcArray[2]
lcArray[1]="This is a test"
lcArray[2]="Looking for text"
?ASCAN(lcArray,"text") && returns 0
?ASCAN(lcArray,"look") && returns 0
?ASCAN(lcArray,"Look") && returns 2

?ATC("text",lcArray[2]) && returns 13
Previous
Reply
Map
View

Click here to load this message in the networking platform