In ASP programming, it is often necessary to write some functions (or procedures) to implement certain functions, which often need to pass the corresponding parameters to the function (or procedure)
In a function (or procedure) of data processing, that is, there may be a need to retain or change the value of the parameter, the following are the relevant examples
The following function (testaddress) makes it possible to have multiple return values for a function (a function returns a value, a value that is changed by multiple parameters)
Example:
<% @LANGUAGE = "VBSCRIPT"%>
<%
Option Explicit
'===================================================================
' Parameter passing
' 1. Value pass parameter (call by value)
' Function testvalue (ByVal a,byval B)
' The parameter A, B changes in the function does not affect the external variables of the function
'
' 2. Pointer parameter (call to address)
' Function testaddress (ByRef a,byref B)
' The parameter A and B changes in the function affect the external variables of the function
'
Description
' 1. Parameters can be numbers, characters, arrays, objects, and most of the types supported by the VBScript language
' 2. The type of the function return value can also be a number, character, array, object, and so on most types supported by the VBScript language
' 3. Procedure Call parameter method is similar to function
'===================================================================
Dim A1,B1
Dim A2,B2
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.