There are always more than single methods to accomplish the same job in programming language. To loop through the letters from A to Z in ColdFusion there are also more than one way, but I personally found out the following 2 methods are simpler and strain forward.
Hardcode the A to Z into a list and just loop over it
The other way to loop through the letters is using the ASCII value from A to Z. We first convert the A and Z to ASCII, than just use the number to loop through the rest and convert it back to char to get back our result.
from=”#Asc( ‘A’ )#”
to=”#Asc( ‘Z’ )#”
<!— Get character of the given ascii value. —>
<cfset strLetter = Chr( intLetter ) />
Please feel free to share the way you usually use or you may found out any other better way to do the job.