This document covers the following topics:
The following describes an array without fixed size and with strings of variable length. It is sent from client to server and vice versa. The number of strings sent from client to server and from server to client can differ.
Library 'Arrays' Is Program 'FirstArray' 1 Names (AV / V) In Out
Dim names As String Redim mynames(3) Set obj = CreateObject("EOL.ArrayExample") obj.FirstArray mynames
To retrieve the list of mynames, first get the boundaries of the returning array; then you can access it.
For more information, see the Visual Basic documentation.
Attributes defined inside a group in the Software AG IDL file are
accessed via properties (as in the previous version). To use arrays of variable
sizes, two methods were added: get
and
redim
.
Library 'Arrays' Is Program 'FirstArray' 1 PhoneEntry 2 Names (AV) In Out 2 PhoneNumber (AV/V) In Out
redim_<program name>_<name>( LONG newSize, LONG whichDimension, LONG index1, LONG index2, LONG index3 ) get_<program name>_Bounds ( LONG* lowerBoundary, LONG* upperBoundary, LONG whichDimension, LONG index1, LONG index2, LONG index3 ) LONG get_<program name>_LowerBound ( LONG whichDimension, LONG index1, LONG index2, LONG index3 ) LONG get_<program name>_UpperBound ( LONG whichDimension, LONG index1, LONG index2, LONG index3 )
redim_<name>( LONG newSize, LONG whichDimension, LONG index1, LONG index2, LONG index3 ) get_<name>_Bounds( LONG* lowerBoundary, LONG* upperBoundary, LONG whichDimension, LONG index1, LONG index2, LONG index3 ) LONG get_<name>_LowerBound ( LONG whichDimension, LONG index1, LONG index2, LONG index3 ) LONG get_<name>_UpperBound ( LONG whichDimension, LONG index1, LONG index2, LONG index3 )
Use redim to increase or reduce the number of elements in an array. In a multi-dimensional array you can use the indices to modify a subarray.
Library 'Arrays' Is Program 'ThirdArray' 1 User (V) 2 Names (AV) 2 Uid (AV)
Groups with arrays of variable sizes are handled like normal groups
using the methods get
and
redim
:
redim_[<program name>_]<groupname>
and
get_[<program name>_]<groupname>_bounds.