Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to find if a value is already in the list
Message
De
19/06/2007 07:24:45
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01234037
Message ID:
01234193
Vues:
19
This message has been marked as a message which has helped to the initial question of the thread.
>>>>There is a way w/o looping. Set the value and check listindex. However since listboxes can't add much items with this approach you might not need to gain such a performance. Its slowness would be masked with few elements anyway.
>>>>Cetin
>>>
>>>Thanks, Cetin. You're right, usually these lists are very short, so I decided to write this simple code using looping.
>>>
>>>Thanks again.
>>
>>Silly me. Once again knowing what you'd do at the end wasted my time to answer.
>>Cetin
>
>I think I misunderstood your idea then. Would you please elaborate?
>
>Yesterday I already implemented loop idea, in my case I only have a few (less than 5) items in the list.
.Value = cNewValue
if .ListIndex = 0 && not in list add
  .AddItem(cNewValue)
endif
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform