ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage syntax / WLanguage procedures / Procedure parameters
  • Overview
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
Overview
Some of the parameters passed to a procedure can be optional parameters. When declaring the procedure, the optional parameters must be described in last position (on the right), with a default value preceded by the "=" sign:
PROCEDURE <Procedure name>(<Mandatory parameters>, ...
<Optional Parameter 1> = <Value>,
<Optional Parameter 2> = <Value>, ...)
For example:
// -- Declare the procedure
PROCEDURE Drawing(coorRow, coordColumn, BckgrdColor = Black, LineColor = LightYellow)
...
 
// -- Process for calling the procedure
Drawing(10, 15)
To keep the default value of an optional parameter, use the "*" character during the call to the procedure. For example:
// -- Declare the procedure
PROCEDURE Drawing(coorRow, coordColumn, BckgrdColor = Black, LineColor = LightYellow)
...
 
// -- Process for calling the procedure
Drawing(10, 15, *, LightGreen)
Remark: For a Webservice, the procedures used by the Webservice must not contain any optional parameters.
Otherwise, the following message is displayed from version 21:
The 'ParameterName' parameter of the 'ProcedureName' procedure is optional.
Make it mandatory in order to generate the WSDL.
To generate the Webservice, the declaration of procedures must be modified in order to make all the parameters mandatory.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help