using Asc and Chr functions

  • Thread starter Thread starter Kwong
  • Start date Start date
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
 
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.
 
Something like this? (server side)
<%
str = "A"
response.write Asc (str) & "<p>"
A = ASC(str) + 1
response.write Chr(A)
response.end
%>
MikeR
 
Back
Top