VBScript » Statements » Call

Version: 1.0


The Call statement can be used for calling a function or subroutine.

Note that the use of Call is optional. In other words, you can call a function or subroutine by simply stating the function's or subroutine's name. If you use Call and if there are one or more arguments to be passed you must enclose all of the arguments in parentheses. If you do not use Call, do not use the parentheses.

If you use Call to call a function, the return value of the function is discarded.


<% Call afunction %>

<% afunction %>

<% Call myfunction(myvar1, myvar2, mystring, myarray) %>

<% myfunction myvar1, myvar2, mystring, myarray %>

<% Call anysubroutine(anum, astring) %>

<% anothersubroutine %>
Language(s): VBScript