Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SUBSTR(m.c, 1, m.lnY) vs LEFT(m.c, m.lnY)... Why?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00525954
Message ID:
00526010
Vues:
20
You know how it is Thom, the more you use a specific command/function the more likely you will use it again. Because substr is used in many diferent situations a coder will likely use substr instead of the more appropriate left function. The same could be said for the right function, the substr function is probably used more often than the right (no pun) function.

This same principle is common in speach as well, how often have you heard someone use a word or phrase with which they are more familiar, than one which they are less familiar? For a while, in the near VFP past, the expression "Cool" was used excessively, instead of more accurate but less recognizable phrasing.


Glenn



>David,
>
>>>They both resolve to extremely fast string manipulation routines in C++. The only speed difference you should be able to detect is that left() only takes two arguments vs the three for substr(). But I seriously doubt you'll see much performance differences.
>
>
>That's what I'd figured. So, I still can't understand why so many people use the SUBSTR() version. Oh well, it least I'm not missing anything.
>
>Thanks,
>Thom
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform