Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Andy Kramek
  Where is Andy Kramek?
 Hot Springs Village
 Arkansas - United States
 Andy Kramek
 To: Raymond Wong
  
 
 
 Raymond Wong
 Tags
Subject: RE: Help me with this code
Thread ID: 50691 Message ID: 50827 # Views: 1 # Ratings: 0
Version: Visual FoxPro 7 Category: Reports and Printers
Date: Monday, September 06, 2004 12:55:32 PM         
   


Hi Raymond

> I wonder why INLIST doesn't behave as expected.
> I'm suspecting that INLIST is treating the whole list as only 1 item. So when it compares 153610 with '127473, 153610, 153610', they don't match.

That is indeed correct. To use INLIST() you have to format the string so that it evaluates correctly. Thus this will work:
lcStr = ['10'] + ',' + ['11'] + ',' + ['12']
? INLIST( '11', &lcStr )

But this will not:
lcStr = ['10,11,12']
? INLIST( '11', &lcStr )

Regards
Andy Kramek
Microsoft MVP (Visual FoxPro)
Akron, OH, USA

ENTIRE THREAD

Help me with this code Posted by Raymond Wong @ 9/4/2004 6:08:49 PM
RE: Help me with this code Posted by Boudewijn Lutgerink @ 9/6/2004 6:55:23 AM
RE: Help me with this code Posted by Raymond Wong @ 9/6/2004 10:33:27 AM
RE: Help me with this code Posted by Andy Kramek @ 9/6/2004 12:55:32 PM
RE: Help me with this code Posted by Raymond Wong @ 9/7/2004 10:40:08 AM
RE: Help me with this code Posted by Juan Antonio Santana @ 9/7/2004 12:32:02 PM
RE: Help me with this code Posted by Andy Kramek @ 9/7/2004 1:18:35 PM
RE: Help me with this code Posted by Raymond Wong @ 9/7/2004 1:43:38 PM
RE: Help me with this code Posted by Boudewijn Lutgerink @ 9/7/2004 1:38:26 PM