Syntax |
Call subroutine_name [(arguments)] |
Description |
Transfers control to the given subroutine, optionally passing the specified arguments. |
Comments |
Using this statement is equivalent to: subroutine_name [arguments] Use of the Call statement is optional. The Call statement can only be used to execute subroutines; functions cannot be executed with this statement. The subroutine to which control is transferred by the Call statement must be declared outside of the Main procedure, as shown in the following example. |
Example |
This example demonstrates the use of the Call statement to pass control to another function. Sub Example_Call(s$) 'This subroutine is declared
externally to Main and displays the text Sub Main() 'This example assigns a string
variable to display, then calls subroutine |
See Also |
C |