Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot access characters beyond string
Message
De
20/08/1998 10:26:07
 
 
À
20/08/1998 09:15:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00128355
Message ID:
00128481
Vues:
25
>Thanks guys for your help. I should have realized that was the problem. I am using two SUBSTR()'s Is there any way to tell VFP to only take the specified number of characters if it is available, and if not, just take all the characters in the field?
>
>Thanks again,
>Eric

Eric,

The LEN(cString) function returns the length of any string in VFP. Sure you can do what you want to;

If the maximum no. of chars you want to extract from your string is n, then,
cExtract = IIF(LEN(cString) < n, SUBSTR(cString, 1), SUBSTR(cString, 1, n))

Sanjay
Sanjay Kapoor

Relatively speaking is a conversation with Einstein
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform