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


> 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

Hi Andy,

Thanks for the clarification.

I have 2 more questions:
1. Does the same limitation of 255 charaters for string apply to the list manipulated using INLIST?
2. Is there a function to count the number of items in the list?

Regards,
Raymond


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