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.
This page is also available for…
|
|
|
|