<%@ page language="vb" %>
<html>
<head>
<title>
vb.net操作符号综合范例
</title>
</head>
<body>
<%
dim intA as integer = 10, intB as integer = 5, intC as integer = 3
dim strA as string = "ASP.NET", strB as string = "VB.NET"
dim blnA as boolean = true, blnB as boolean = false
response.write("条件设置:<br>")
response.write("整数条件: intA=" & intA & ",intB=" & intB & ",intC=" & intC & """<br>")
response.write("字符串条件: strA=""" & strA & """,strB=""" & strB & """<br>")
response.write("布尔代数:blnA=" & blnA & "blnB=" & blnB & "<br><b>")
response.write("括号优先级:")
response.write("(intA - intB)*intC结果为:"&((intA-intB)*intC)&"<br>")
response.write("算数操作符:")
response.write("intA-intB*intC结果为:"&(intA-intB*intC)&",<br>")
response.write("比较操作符:")
response.write("intA>intB的结果为:" &(intA>intB)& ",")
response.write("strA<>strB的结果为 " & (strA<>strB)& "<br>")
response.write("逻辑操作符:")
response.write("blnA and blnB的结果为" & (blnA and blnB) & ",")
response.write("blnA or blnB的结果为" & (blnA or blnB) & "<br>")
%>
</body>
</html>
posted on 2006-02-05 21:36
The Game, tomtom 阅读(681)
评论(1) 编辑 收藏 所属分类:
die