select case是一种条件分支语句,简单的分支可以用if..else...end if解决,但是大量的条件,则用select case了.
举例:
<%
vdegree=request.form("vdegree")
if not isnumeric(vdegree) or vdegree="" then
vdegree=0
end if
select case cint(vdegree)
case 1
response.write "本科"
case 2
response.write "硕士"
case 3
response.write "博士"
case else
response.write "胡闹"
end select
%>
在找到一个合适条件后,就退出程序,否则是else部分了.
sub和function是定义过程的方法,其实,sub是function的一个子集而已,区别是sub可以没有返回值,function可以有返回值.定义格式
sub yoursubname(x,y)
.....
end sub
-----
function yourfuncname(x,y)
.....
yourfuncname=returnvalue
end function
----名称是自己定义的除保留字外的其他东西