Article ID: 171350
Article Last Modified on 10/15/2002
__int64 PhyToNum(char *szFile)
{
__int64 lFileNum = 0; /* Counter for file Number */
int i; /* Loop Variable */
for( i=7; i >= 0; i-- ) /* Start from the right of the filename */
{
lFileNum *= 26; /* Multiply by the appropriate power of 26 */
lFileNum += (__int64)(toupper(szFile[i]) - 'A');
/* Convert the value */
}
return (lFileNum);
}
Please note that the __int64 is a Microsoft-specific variable type for a 64-
bit integer. This code snippet may not work with all compilers.Keywords: kbbug KB171350