How to convert letters to numbers?

I was wondering if anybody knows how to convert letters to numbers? For example, how would you convert the letter “H” in to a number?

Do you mean, as its position in the alphabet?

set alphabet to "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

offset of "H" in alphabet --> 8