Previous Topic Next topic Print topic


COBCH1642 Positional parameters must be specified before any named parameters or property initializers

When a method invocation expression is used, parameters specified by name must follow any purely positional parameters.

In the following example, the param p1 = "Hello" parameter must be declared after the "bye" parameter.

class-id myClass.
 method-id main static.
   invoke self::myMethod(param p1 = "Hello", "bye")
 end method.

 method-id myMethod static.
 procedure division using by value p1 as string, p2 as string.
 end method.
 end class.
Previous Topic Next topic Print topic