- Special cases
- Named parameters
- Calling a global WLanguage browser procedure from a global JavaScript procedure (found in the same set of procedures)
Calling a procedure/a function In french: Appeler une procédure/une fonction
The method for calling a procedure is the same, no matter whether it is a global procedure or a local procedure. Reminder: - In WLanguage, there is no distinction between the procedures and the functions. The syntaxes for declaring and using procedures also apply to functions.
- For a multi-syntax procedure, the call to the proper syntax is resolved at runtime. For more details, see Prototype overload.
// Call to the Find procedure that returns a boolean IF Find(Customer, CustNum, Number) THEN Info("Customer number found") ELSE Info("Customer number not found") END
Syntax
Calling a procedure that returns a parameter Hide the details
[<Returned value> = ] <Procedure name>([<Parameters>])
<Returned value>: Value returned by the procedure (optional), only if the procedure returns a result.The type of the return value of a procedure can be specified during its declaration. For more details, see Declaring a procedure. <Procedure name>: Name of the procedure to call. <Parameters>: Parameters passed to the procedure. Each parameter is separated by a comma.
Calling a procedure that returns several parameters Hide the details
(<Value 1>, ..., <Value N>) = <Procedure name>([<Parameters>])
<Value 1 to N>: Values returned by the procedure.The type of the return values of a procedure can be specified during its declaration. For more details, see Declaring a procedure. <Procedure name>: Name of the procedure to call. <Parameters>: Parameters passed to the procedure. Each parameter is separated by a comma.
Remarks Special cases - To make your programs more readable, the PROCEDURE keyword can be replaced with the FUNCTION keyword.
- If the procedure expects no parameter, you can also use the following syntax:
[<Returned value> = ] <Procedure name>
- To run a procedure of an opened window, use ExecuteProcess. Example:
// Run the MyProc procedure found in WIN_MyWindow WinName is string = "WIN_MyWindow" ExecuteProcess(WinName + ".MyProc", trtProcedure)
This page is also available for…
|
|
|