ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Errors / WLanguage errors
  • Reason
  • Correction
  • Example
  • Declaring a procedure
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
Error 204: using a parameter without optional value after parameters ...
Reason
When declaring this function (or this procedure), optional parameters have been declared. These optional parameters do not respect the declaration syntax of the function (or procedure).
Reminder: When declaring a function (or a procedure) that accepts optional parameters, these optional parameters must necessarily be described in last position when declaring the function (or the procedure), with a default value preceded by the "=" sign.
Correction
Modify the declaration syntax of your function (or procedure):
  • move the optional parameters at the end of the declaration of the function (or procedure),
  • give a default value to the last parameter(s).
Tip: To use the default value specified in the declaration of the function (or procedure), simply use the ' * ' character instead of the parameter when calling the function.
Example: The declaration code of the function is:
MyFunction(i, j=5, k=6)
The following syntax allows you to use the default value of parameter j and to specify the value of parameter k:
MyFunction (5, *, 10)
Example

Declaring a procedure

Code triggering the error
PROCÉDURE MyFunction(Param1, Param2=True, Param3=5, Param4)
Possible corrections
Move the optional parameters: the optional parameters must be the last parameters specified when declaring the function (or the procedure).
PROCÉDURE MyFunction(Param1, Param4, Param2=True, Param3=5)
Give a default value to the last parameter of the function (or procedure). This last parameter becomes an optional parameter.
PROCÉDURE MyFunction(Param1, Param2=True, Param3=5, Param4=10)
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help