ILPARAMS

Determines the way in which you call a method that contains an array as its last receiving parameter.
Restriction: This directive is supported for .NET COBOL, but not native COBOL.

Syntax:

>>------.----ILPARAMS--.---><
        +--NOILPARAMS--+

Parameters:

None.

Properties:

Default: ILPARAMS
IDE equivalent: None

Comments:

When set at its default (ILPARAMS), you can specify a list of 0 or more arguments of the array element type instead of a single array argument, for any method that has an array as its last parameter. When NOILPARAMS is set, you can specify a list only when the target method specifies the PARAMS attribute.

Example:

$set ilparams  *> you need this set if params is omitted
 class-id myClass.
 method-id main static.
   declare i as binary-long
   set i to self::Sum(1 2 3 4 5 6 7 8 9 10)
			display i
 end method.

 method-id Sum static.
 procedure division using params opds as binary-long occurs any
                        returning ret as binary-long.
   set ret to 0
   perform varying i as binary-long through opds
     add i to ret
   end-perform
 end method.
 end class.
Note: Instead of the first set statement, the following syntax will work whether or not the target method contains the params keyword: Set i to self::Sum(table of binary-long(1 2 3 4 5 6 7 8 9 10))