Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ASCAN to be precise
Message
De
29/07/2001 13:03:38
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00536993
Message ID:
00536999
Vues:
7
>>In an array, I have a definition of the fields of my table. So, the first row contains all the field names. When I use ASCAN to find a specific field name, it will locate the proper row. However, assuming I want to search for field name NOM and that I have another field NOMEMBER which is placed before NOM in the array, NOMEMBER will be found before NOM. How can I force ASCAN to be precise?
>
>I guess you are talking about VFP 6 because in VFP 7 ASCAN has a parameter to control exact comparison.

Yes, it is VFP6. Good to hear that VFP7 will take care of that.

>1. When You create array pad field names to the MAXLEN and than ASCAN(myarray, PADR(filedname, MAXLEN))

Well, the array is created with AFIELD, so it can't be applied.

>2. Write FOR loop to scan thru array and do exact comparison using == operator.

What I did was to add SET EXACT ON before ASCAN and SET EXACT OFF after.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform