|
|
|
|
|
- Reason
- Correction
- Example
- The * character is used to replace a parameter with no default value
Error 810: * can only be used for a parameter with a default value
You are trying to use the * character to replace a parameter in a function or in a procedure. When defining the procedure or the function, no default value was specified for this parameter. Two possibilities: - Delete the * character.
- Give a default value to the parameter in the declaration of the procedure or function.
The * character is used to replace a parameter with no default value Code triggering the error Compare(*,2) Â PROCEDURE Compare(Number1, Number2=5) IF Number1 > Number2 THEN Info(Number1 +" is greater than "+ Number2) ELSE Info(Number1 +" is less than or equal to "+ Number2) END
Possible correction Replace the * character by a value. Compare(5,2) Â PROCEDURE Compare(Number1, Number2=5) IF Number1 > Number2 THEN Info(Number1 + " is greater than " + Number2) ELSE Info(Number1 + " is less than " + Number2) END
Possible correction Give a default value to the parameter. Compare(*,2) Â PROCEDURE Compare(Number1=10, Number2=5) IF Number1 > Number2 THEN Info(Number1 + " is greater than " + Number2) ELSE Info(Number1 + " is less than " + Number2) END
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|