欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
ASP Sub Procedures---ASP Function Procedures

ASP Sub Procedures

ASP Sub Procedures are a collection of ASP statements that perform a task, and are executed by an event procedure. Event Procedures are any clickable objects, or onload event. Sub procedures do not return a value, but executes it‘s content on "call".
This is an asp sub procedure that is used to write information stored in variables:
 
<%
Sub GetInfo()
dim name,telephone,fee
name="Mr. John Doe"
telephone="555-5555"
fee=20
Response.write("Name: "& name &"<br>")
Response.write("Telephone: "& telephone &"<br>")
Response.write("Fee: "& fee &"<br>")
End Sub
GetInfo()
%>
This example simply declares, populates, & writes three variables in the asp sub procedure, ‘GetInfo‘. This sub is executed right after the end sub.
 
Here is the execution result:
 
Name: Mr. John Doe
Telephone: 555-5555
Fee: 20

 
You can pass an argument to the asp sub procedure, and provide the value(s) when calling it.
This is an asp sub procedure that accepts an argument:
 
<%
Sub circle(r)
dim pi,area,diameter,circum
pi=3.14
area=pi*r^2
diameter=2*r
circum=2*pi*r
Response.write("The Circle with a radius of: "&r&" has the area of: "&area)
Response.write(", the diameter of: "&diameter&" and a circumference of: "&circum)
End Sub
%>
Here is the execution result:
 
The Circle with a radius of: 2 has the area of: 12.56, the diameter of: 4 and a circumference of: 12.56

ASP Function Procedures

ASP Function Procedures are a series of VBscript statements enclosed by the ‘Function‘, and ‘End Function‘ statements. Function procedures are similar to a ‘Sub procedure‘, but can also return a value. An asp function procedure can accept arguments (constants, variables, or expressions) that are passed to it by calling a procedure).
 
This is a none-parameterized asp function procedure:
 
<%
function userName()
userName="MaryLou"
end function
%>

 
This function procedure remembers a username. You can use this function any number of times in your program, and you can change it once to maintain it- use ‘userName()‘ to call this function. For example: response.write("The username is: "&userName())
 
This is a parameterized asp function procedure:
 
<%
Function total(price)
dim tax
tax=price*.09
total=price+tax
end Function
%>

 
The price value is provided when calling the function- Example: response.write("The total price is: " & total(50))
This is an asp function procedure that accepts an argument:
 
<%
Function profit(sellPrice, cost)
dim pr
profit=sellPrice-cost
End Function
dim currProfit currProfit=profit(1280,890) Response.write("Profit: $"&currProfit)
%>
Here is the execution result:
 
Profit: $390

本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
asp 學(xué)習筆記
asp下載防盜鏈代碼
asp防止同時(shí)登陸的問(wèn)題
在A(yíng)SP中使用Oracle數據庫
ASP連接SQL服務(wù)器代碼
asp類(lèi)的定義和使用方法_ASP教程_ASP編程網(wǎng)
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久