Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Serial Number with A-Z
Message
De
19/07/2000 04:01:30
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
18/07/2000 23:15:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00394168
Message ID:
00394216
Vues:
13
>I need a serial # scheme that works like newid(), But uses Letters as well as numbers. Anyone have some code or know where I can get it.
>Oh i'm using vfp 5
>
> Thanks Kelly


This is only with A-Z :
function myAlpha && Haven't tried but supposed to work up to 26^128
lparameters tnValue && Convert tnvalue to Excel alpha notation
if tnValue = 0
	return ""
endif
if tnValue <= 26
 return chr(asc("A")-1+tnValue)
else
 return ;
   myAlpha(int(iif(tnValue% 26 = 0,tnValue - 1, tnValue) / 26)) + ;
   myAlpha((tnValue-1)%26+1)
endif
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform