|
Reading/Parsing an ASCII File #3 by
Charles Carroll
Here is one implementation of scoring the HTML file.
filename=/learn/test/mbrespond.asp
<%option explicit%>
<html>
<head>
<title>mbrespond.asp</title>
</head>
<%
dim key
dim ecount, icount
dim scount, ncount
dim tcount, fcount
dim jcount, pcount
dim ucount
For Each Key in Request.Form
SELECT CASE request.form(key)
CASE "E"
ecount=ecount+1
CASE "I"
icount=icount+1
CASE "S"
scount=scount+1
CASE "N"
ncount=ncount+1
CASE "T"
tcount=tcount+1
CASE "F"
fcount=fcount+1
CASE "J"
jcount=jcount+1
CASE "P"
pcount=pcount+1
CASE "U"
ucount=ucount+1
END SELECT
Next
Response.write "E=" & ecount & "<br>"
Response.write "I=" & icount & "<br>"
Response.write "S=" & scount & "<br>"
Response.write "N=" & ncount & "<br>"
Response.write "T=" & tcount & "<br>"
Response.write "F=" & fcount & "<br>"
Response.write "J=" & jcount & "<br>"
Response.write "P=" & pcount & "<br>"
Response.write "U=" & ucount & "<br>"
%>
<body bgcolor="#FFFFFF">
</body>
</html>
|