Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alphabet Position
Message
 
À
02/01/2009 15:05:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01370761
Message ID:
01370797
Vues:
16
>I am looking for a quick function that I can use while coding excel automation. Is there a function that you can send a number to and get the alphabet position back for it? For example if I send a 1 I get back A, 3 a C...
>
>Happy New Year!!!!!

If you want this on the VFP side sure, here's one;
LPARAMETERS lnPosition
LOCAL lcLetters
lcLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
IF TYPE("lnPosition") <> "N" OR lnPosition < 0 OR lnPisiont > 26
   * Error bad parameter passed

ENDIF
RETURN SUBSTR(lcLetters,lnPosition,1)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform