This function retrieves the structure of the output parameter (if any) returned by the function which is called by the Execute function. The output parameter can be either a variable or an array. With arrays, each element in the array can itself be an array. A variable can be seen as an array containing only one element.
To obtain the number of elements in the main array, the index must be set to –1.
The first element in the array is located at index 0.
Context
Windows client,
Windows server.
Parameters
NUM_BIN_4 |
Index |
Index of the element in the main array of which the number of elements is to be retrieved |
Input parameter |
||||||||||||
NUM_BIN_4 |
NbElements |
Number of elements for the given index |
Output parameter |
||||||||||||
NUM_BIN_4 |
ReturnCode |
Return code for the operation Possible values:
|
Output parameter |
Example
NUM_BIN_4 NbElements
NUM_BIN_4 ReturnCode
/* Assuming that function 'FctScript' returns an array ReturnArr with six elements; the structure is the following :
/* ReturnArr(0) = 2 variable
/* ReturnArr(1) = {'String1' ; 'String2' ; 456} array with 3 elements
/* ReturnArr(2) = {3,14 ; 2,718} array with 2 elements
/* ReturnArr(3) = CInt(5)
/* ReturnArr(4) = CDate("1966/07/12")
/* ReturnArr(5) = CDate("19:07:12")
/* Retrieve the size of the main array
CALL_DLL 'VaToCom' 'GetParameterSize' –1 NbElements ReturnCode
/* NbElements equals 6
/* Retrieve the size of the first element in the main array
CALL_DLL 'VaToCom' 'GetParameterSize' 0 NbElements ReturnCode
/* NbElements equals 1
/* Retrieve the size of the second element in the main array
CALL_DLL 'VaToCom' 'GetParameterSize' 1 NbElements ReturnCode
/* NbElements equals 3
/* Retrieve the size of the third element in the main array
CALL_DLL 'VaToCom' 'GetParameterSize' 2 NbElements ReturnCode
/* NbElements equals 2
/* Assuming function 'FctScript' returns a variable:
/* Retrieve the size of the main array
CALL_DLL 'VaToCom' 'GetParameterSize' –1 NbElements ReturnCode
/* NbElements equals 1
/* Retrieve the size of the first element in the main array
CALL_DLL 'VaToCom' 'GetParameterSize' 0 NbElements ReturnCode
/* NbElements equals 1