Previous ION Java User's Guide: ION Java Class and Method Reference Next

arrayDimensions()

The arrayDimensions() method returns an int array that contains the size of the dimensions of the array variable. If the variable is not an array, an exception is thrown.

Syntax

public final int[] arrayDimensions()

Return Value

The function returns an int array that contains the size of each dimension in the corresponding element of the array. The number of dimensions available can be determined through the length property of the returned array.

Arguments

None

Exceptions

IONNotAnArrayException

Example

try {  
int dims[] = oVariable.arrayDimensions();  
}catch(IONNotAnArrayException e){  
   System.err.println("Variable is not an array");  
}  

  IDL Online Help (March 06, 2007)