ASP 101 - Active Server Pages 101 - Web01
The Place ASP Developers Go!

Please visit our partners

Windows Technology Windows Technology
15 Seconds
ASP 101
ASP Wire
VB Forums
VB Wire
internet.commerce internet.commerce
Partners & Affiliates

ASP 101 is an site
ASP 101 is an site
Internet News
Small Business
Personal Technology

Corporate Info
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash

ASP Source Code:
' This function takes two integers and ads them together.
Function Add(intA, intB)
	' Declare a variable to store the result.
	' Since it was declared inside the function
	' you can only access this variable while
	' you're inside the function.
	Dim intResult
	' Do our calculation and store the result.
	intResult = intA + intB
	' Set our return value by assigning it
	' to the function's name.
	Add = intResult
End Function
<p>Here are a couple examples of calling the function:</p>
<p>1 + 2 = <%= Add(1, 2) %></p>
<p>534 + 3142 = <%= Add(534, 3142) %></p>

Back the the Sample Output

Back to the Sample Index

Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback
The Network for Technology Professionals



Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers