Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert character to ASCII

Status
Not open for further replies.

Jay2003

Programmer
Feb 26, 2003
147
0
0
GB
Hi,

How do I convert a letter to it's ASCII value and also possibly make the ascii value say -3 or plus 3.

The reason is that I am trying to compare passwords that have been converted to ASCII and moved up or down a certain length.

Thanks in advance

J
 
Jay2003,

You have asc() and its reverse chr().
Code:
s="password"
for i=0 to len(s)-1
	schar=mid(s,i+1,1)
	nascii=asc(schar)
	wscript.echo schar & vbcrlf & nascii & vbcrlf & chr(nascii)
next
regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top