デフォルトの設定 (ILPARAMS) の場合、最後のパラメーターが配列である任意のメソッドに対して、単一の配列引数の代わりに 0 個以上の配列要素型の引数のリストを指定できます。NOILPARAMS が設定されている場合は、ターゲット メソッドで PARAMS 属性が指定されている場合にのみリストを指定できます。
$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.