contents   index   previous   next



SafeArrayGetLBound

 

(SafeArrayLowerBound)

 

f90VB Modules

 

f90VBDefs, f90VBSafeArrays

Summary

 

Returns the lower bound of a dimension in a Safe Array.

 

SafeArrayGetLBound is a subroutine. It returns the lower bound of a dimension in argument Bound. SafeArrayLowerBound is a function whose return value is the lower bound of the passed Safe Array dimension. Function SafeArrayLowerBound is usually more convenient to use when setting limits to the iterator of a DO loop.

Syntax

 

Syntax Variation 1:

 

integer(LONG_KIND) function SafeArrayLowerBound (SARef, nDim, iRet)

Syntax Variation 2:

{
integer(SAFEARRAY_KIND),intent(in):: SARef |
type(FSafeArray),intent(in):: SARef |
}
integer(LONG_KIND),intent(in):: nDim
integer(HRESULT_KIND),intent(out),optional:: iRet

 

subroutine SafeArrayGetLBound (SARef, nDim, LBound, iRet)

{
integer(SAFEARRAY_KIND),intent(in):: SARef |
type(FSafeArray),intent(in):: SARef |
}
integer(LONG_KIND),intent(in):: nDim
integer(LONG_KIND),intent(out):: Bound
integer(HRESULT_KIND),intent(out),optional:: iRet

Arguments

 

SARef [Input]

A handle to, or a Fortran Safe Array structure containing a handle to, an allocated Safe Array descriptor.

 

nDim [Input]

The array dimension for which to get the lower bound.

 

Bound [Output]

Variable where the lower bound is returned. If you are using Syntax Variation 1, the lower bound is returned as the result of function SafeArrayLowerBound.

 

iRet [Output, Optional]

Upon return, iRet contains S_OK or an error code. See comments for more information.

Comments

 

Note that SARef must be a reference to an allocated Safe Array descriptor.

 

If an error condition occurs, the return value of function SafeArrayLowerBound is an error code, as described in iRet.

Argument iRet

 

Indicates success or failure of the subroutine. The following codes can be returned in this argument:

 

 

Value returned in argument iRet Description
S_OK Success.
DISP_E_BADINDEX The specified dimension is out of bounds.
E_INVALIDARG The item pointed to by SARef is not a Safe Array descriptor

Examples

 

See example for SafeArrayGetDim.

Related Topics

 

For information about See
Creating a Safe Array SafeArrayCreate
Obtaining the upper bound of an array dimension SafeArrayGetUBound
Obtaining the number of elements in an array dimension SafeArrayGetNElements
Setting the bounds of an array dimension SafeArraySetBounds
Allocating a Safe Array descriptor SafeArrayAllocDescriptor

 


SafeArrayGetLocks