InList Parameter Mode

Previous Next

You can define one InList parameter for all non-mandatory (variable) parameters of a method.

For this InList parameter, define the Variable data type. There can only be one parameter with InList Mode, and this parameter must be the last one in the in-going parameter list.

For COM components, the Variable data type is translated to VARIANT. For Java components, the Variable data type is an array of Objects.

Example:

Suppose a CALCULATE component has a SUM method that adds up all parameters. The minimum number of parameters is two, and there is no maximum number. The statement:

SELECT   Calculate.Sum( 2, 3 )

 

must return: 5, and the statement:

SELECT   Calculate.Sum( 2, 3, 7, 4 )

 

must return: 16.

For the SUM method, define parameters:

Seqno

Name

Mode

Data Type

1

par1

In

Long Integer

2

par2

In

Long Integer

3

Result

Return

Long Integer

4

variables

InList

Variable