using Asc and Chr functions

K

Kwong

Hi,

I am retrieving an alphabet letter from a file and i want to increase
it by 1. ex. C goes to D, X goes to Y.
I realised that the ASC function does not allow variables. Is there an
easier way to increase my alaphabet letter, say to use chr(x), x=x+1,
rather than hard coding a bunch of if statements that manually check
what letter is in the variable?

thanks
kwong
 
K

Kevin Spencer

Are we talking server-side ASP or client-side JavaScript here?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Sometimes you eat the elephant.
Sometimes the elephant eats you.
 
M

MikeR

Something like this? (server side)
<%
str = "A"
response.write Asc (str) & "<p>"
A = ASC(str) + 1
response.write Chr(A)
response.end
%>
MikeR
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top