<%@ 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 閱讀(683)
評論(1) 編輯 收藏 所屬分類:
die