Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Call statement ====== ==== Description ==== Executes an external subroutine. ==== Syntax ==== **Call**[//subroutine // @VARIABLE //// @MATRIX//(index//)]// //[(//argument// [ //, argument...// ])] ==== Parameters ==== The Call statement has the following parameters. ^Parameter^Description^ |//Subroutine//|The Call subroutine format transfers program control directly to the specified subroutine.\\ \\ Control will return to the calling program at the line following the Call statement.| |@VARIABLE //or// @MATRIX|Can be used to indirectly call an external subroutine. The subroutine is called indirectly by first assigning the subroutine name as the value of a variable or matrix, and then using the Call @ statement. In the following example, the subroutine FEDTAX is called:\\ \\ ITAX = "FEDTAX"\\ Call @ITAX\\ \\ The number of arguments passed must be less than or equal to the actual number of parameters specified in the Compile Subroutine header in the subroutine.| |//Argument//|A variable, matrix, constant, or expression that is used to pass values to and from the calling program and the subroutine. The number of arguments in the calling program must match the number of arguments defined in the subroutine being called. If there is no value for an argument, include the argument delimiter.\\ \\ An argument can consist of one or more expressions, separated by commas and enclosed in parentheses.\\ || ==== See Also ==== [[declare|Declare]], [[function_statement|Function]], [[return|Return]], [[subroutine|Subroutine]] ==== Example ==== <code> Call Msg(@window, "Hello world!") * OR Declare Subroutine Msg Msg(@window, "Hello world!") * OR SUB_NAME = "Msg" Call @SUB_NAME(@window, "Hello world!") ** ** </code> guides/programming/programmers_reference_manual/call.txt Last modified: 2024/06/19 20:20by 127.0.0.1