Joeandtel wrote on 14 nov 2003 in
microsoft.public.inetserver.asp.general:
'When I create a single character string
var str = "A"
'convert to ascii
num = asc(str)
Response.Write num ' 65 shows up
'when I have a whole string
str = "hello"
str = mid(str, 1, 1) ' return 'h'
num = asc(str)
'I get an error:
Invalid procedure call or argument: 'asc'
What can be done to fix this?
<%
response.write asc("h") &"<br>"
response.write asc("hello") &"<br>"
str="hello"
response.write asc(str) &"<br>"
s=mid(str,1,1)
response.write asc(str) &"<br>"
response.write asc(mid("hello",1,1)) &"<br>"
%>
gives:
104
104
104
104
104
no error to be seen.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)