Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug in GetWordNum
Message
De
15/08/2017 05:49:26
 
 
À
13/08/2017 12:49:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Divers
Thread ID:
01653264
Message ID:
01653307
Vues:
51
Thank you all for sharing your wisdom.

Actually this resolved many coding programs I have encountered. When parsing, say code, the line may begin with white spaces (including Tags characters). GetWordNum() ignores these white spaces and returns the first word. This simplifies coding greatly.

It make me stand-back and consider what other misconceptions I need to unlearn.

>Hi All,
>
>After nearly an hour of screaming, I discovered the source to a recent issue.
>There is a bug in GetWordNum(). If the string being searched begins with the delimiter, and you are requesting the first word, the function will return the Second word in the list.
>
>
>? GetWordNum( "1,2,3", 1, ",")                     && returns "1"
>? GetWordNum( ",2,3", 1, ",")                       && returns "2"
>? GetWordNum( ",,3", 1, ",")                         && returns "3"
>
Greg Reichert
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform