Show/Hide Toolbars

XSharp

Parameters with CLIPPER calling convention cannot have default values.

This error occurs in code like the following.

 

FUNCTION Test(a, b := 10, c := 20)
RETURN  a+b+c

This will become a function with CLIPPER calling convention since the parameters are not typed.
The following will work:

FUNCTION Test(a AS USUAL, b := 10 AS USUAL, c := 20 AS USUAL)
RETURN  a+b+c

or

FUNCTION Test(a,b,c)
Default(@b, 10)     // or better: Default( REF b, 10)
Default(@c, 20)     // or better: Default( REF c, 20)
RETURN  a+b+c