PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Reason
  • Correction
  • Example
  • Declaring a procedure
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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 when declaring the function (or the procedure), use the ' * ' character instead of the parameter during the call to 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
PROCEDURE 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).
PROCEDURE 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.
PROCEDURE MyFunction(Param1, Param2=True, Param3=5, Param4=10)
Minimum required version
  • Version 0
This page is also available for…
Comments
Click [Add] to post a comment