Alphabet

1. Senior Member
Join Date
Dec 1969
Posts
275

## Alphabet

Anyone know how to print out the alphabet in asp...Set up a loop that starts with A and continues thru to Z..THanks

2. Senior Member
Join Date
Dec 1969
Posts
11,247

## RE: Alphabet

i think<BR><BR>for x=65 to 90<BR> chr(x)<BR>next

3. Senior Member
Join Date
Dec 1969
Posts
120

## RE: Alphabet

or 97 to 122 :)

4. Senior Member
Join Date
Dec 1969
Posts
11,247

## Not bad for off top of my head (eop)

.

5. Senior Member
Join Date
Dec 1969
Posts
11,247

## said A - Z not a - z

So ya boo

6. Senior Member
Join Date
Dec 1969
Posts
96,118

## Well, WK is right, but...

...why not do it the *clearest* possible way:<BR><BR>&#060;%<BR>alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"<BR>For letter = 1 To 26<BR> Response.Write Mid(alphabet,letter,1)<BR>Next<BR>%&#062;<BR><BR>B ut if you want to use WK&#039;s idea, one way to never have to remember the actual numbers is:<BR><BR>&#060;%<BR>For letter = Asc("A") To Asc("Z")<BR> Response.Write Chr(letter)<BR>Next<BR>%&#062;<BR>

7. Senior Member
Join Date
Dec 1969
Posts
11,247

## Neat Bill Thinking outside the box

like it!<BR><BR>&#060;%<BR>For letter = Asc("A") To Asc("Z")<BR> Response.Write Chr(letter)<BR>Next<BR>%&#062; <BR>Of course that then means you can change easy to lower or reverse cooool

8. Senior Member
Join Date
Dec 1969
Posts
96,118

## An interesting but obscure note...

...is that in EBCDIC encoding (used by IBM mainframes since the 1960&#039;s and still in use today), the letters are NOT equivalent to sequential numbers!<BR><BR>The letters A to J are in one group, then there&#039;s a gap, the letters K to T in another, another gap, and U to Z in another.<BR><BR>So you&#039;d *have* to use the first set of code I showed in that environment.<BR><BR>And of course the reason I like that code is because it comes in handy at Christmas time:<BR><BR>&#060;%<BR>letters = "ABCDEFGHIJKMNOPQRSTUVWXYZ"<BR>For i = 1 To Len(letters)<BR> Response.Write Mid(letters,i,1)<BR>Next<BR>%&#062;<BR><BR>Do you see why?<BR><BR>[No fair peeking at the answer.]<BR><BR>

9. Senior Member
Join Date
Dec 1969
Posts
96,118

## NO PEEKING! read prior msg first!

&#060;%<BR>letters = "ABCDEFGHIJKMNOPQRSTUVWXYZ"<BR>For i = 1 To Len(letters)<BR> Response.Write Mid(letters,i,1)<BR>Next<BR>%&#062;<BR><BR>See? That displays no "L."<BR><BR><BR>

10. Senior Member
Join Date
Dec 1969
Posts
275

## RE: Alphabet

Thanks all...appreciate it

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•