Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot access characters beyond string
Message
De
20/08/1998 15:19:18
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
20/08/1998 09:15:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00128355
Message ID:
00128601
Vues:
27
>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

You can omit the third parameter in Substr(), so it takes whatever it finds from the offset you gave, to the end of string. Thus, Substr("abcdef",3,2) gives you "cd", but Substr("abcdef",3) gives "cdef".

Nevertheless, Substr("abcdef",9,2) will surely give you an error. You should test for the length of the string first.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform