contents   index   previous   next



Automatic Safe Arrays

 

f90VB also offers a very convenient way to create Safe Arrays called Automatic Safe Array Creation. Automatic Safe Arrays are created by calling subroutine SafeArrayCreate passing a Fortran Array as the third argument. The basic syntax for Automatic Safe Array creation is as follows:

 

call SafeArrayCreate(SARef, vtType, FortranArray)

 

Where argument FortranArray is a one or two-dimensional Fortran array of a supported Fortran type [11]. Argument vtType indicates the type of the FortranArray and the type of the Safe Array handle returned in SARef. Safe Arrays created this way contain the same dimensions, index bounds and type as the Fortran array passed in argument FortranArray. Note that Automatic Safe Array creation does not perform type conversion, so argument vtType must contain a value that is directly compatible with the type of the elements of FortranArray. Table 2.2 shows acceptable combinations of vtType and FortranArray types, as well as the type of the resulting Safe Array.