Executing the following statements in the Command window demonstrates the relation between ASC( ) and CHR( ):

? asc( "A" ) // 65

? chr( asc( "A" ) + 32 ) // "a"

? asc( chr( asc( "A" ) + 32 ) ) // 97

In the following example, if the variable cDrive contains a drive letter, ASC( ) is used to convert the drive letter to a number suitable for the DISKSPACE( ) function.

nDiskSpace = diskspace( asc( cDrive ) - asc( "A" ) + 1 )