Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filter incorrect coded values
Message
De
31/12/2001 11:03:35
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00599378
Message ID:
00599382
Vues:
26
>One more complication for Amenities field - this field is 10 char long and it's a concatenation of codes, e.g. ABCUD, where each letter is a code. How would we filter those contain incorrect codes?

For this one, I don't know a simpler alternative than to use a FOR loop.
* Function for validation)
local i
for i = 1 to len(amenities)
  if not substr(Amenities, i, 1) $ "ABCDE" && or other valid codes
    return .F.
  endif
next
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform