ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage syntax / WLanguage procedures
  • Special cases
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
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.
Example
// Appel de la procédure Trouve qui retourne un booléen
IF Trouve(Client, NumCli, Numéro) THEN
Info("Numéro de client trouvé")
ELSE
Info("Numéro de client inexistant")
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 Registering an Procedure.
<Procedure name>:
Name of the procedure to call.
<Parameters>:
Parameters passed to the procedure. Each parameter is separated by a comma.
For more details on how to declare the parameters of a procedure, see The parameters of a procedure.

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 Registering an Procedure.
<Procedure name>:
Name of the procedure to call.
<Parameters>:
Parameters passed to the procedure. Each parameter is separated by a comma.
For more details on how to declare the parameters of a procedure, see The parameters of a procedure.
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:
    [<Valeur retournée> = ] <Nom de la procédure>
  • To run a procedure of an opened window, use ExecuteProcess. Example:
    // Exécution de la procédure MaProc contenue dans la fenêtre FEN_MaFenêtre
    NomFen is string = "FEN_MaFenêtre"
    ExecuteProcess(NomFen + ".MaProc", trtProcédure)
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 11/22/2023

Send a report | Local help