David Crooks wrote: > On Wednesday, February 20, 2008 7:38 PM Paul Newton wrote: > > >> I just tried my suggestion and your original and they both work (in >> > VFP9) > > >> DIMENSION lanames(3,3) >> lanames(2,2)="David Crooks" >> ? ASCAN(lanames,"David",1,-1,0,5) >> 5 >> ? ASCAN(lanames,"David",-1,-1,0,5) >> 5 >> > > But, if I try these then I get 0: > ? ASCAN(lanames,"Crooks",1,-1,0,5) > ? ASCAN(lanames,"Crooks",-1,-1,0,5) > David
That is only to be expected because, regardless of the "EXACT": setting the comparison takes place character-by-character starting from the first (leftmost) position ... you are correct that you will need a FOR ..ENDFOR to go through the array column you are interested in and do the check using the $ (substring) function ... Paul Newton _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

