|
ION Java User's Guide: ION Java Class and Method Reference |
|
The IONVariable() method constructs an object of the specified IDL data type. The variable can be either a scalar or an array.
public IONVariable()
public IONVariable(byte b)
public IONVariable(short s)
public IONVariable(int i)
public IONVariable(float f)
public IONVariable(double d)
public IONVariable(String s)
public IONVariable(String s, boolean b)
public IONVariable(IONDComplex cmplx)
public IONVariable(byte b[], int dims[])
public IONVariable(short i[], int dims[])
public IONVariable(int i[], int dims[])
public IONVariable(float f[], int dims[])
public IONVariable(double d[], int dims[])
public IONVariable(String s[], int dims[])
public IONVariable(IONComplex cmplx[], int dims[])
public IONVariable(IONDComplex cmplx[], int dims[])
Most arguments are straightforward. If no arguments are specified, the IONVariable object corresponds to an IDL variable of type "Undefined." Type "short" corresponds to IDL type "integer", and type "int" corresponds to IDL type "long integer." The size of arrays and the array dimension array are determined through the use of the Java array length property.
To create an IONVariable object of type float:
IONVariable oVariable = new IONVariable(1234.5678);
To create an IONVariable object of type float array of size (100,100,3):
float[] farr = new float[100*100*3]; int dims[] = new int[3]; dims[0] = 100; dims[1] = 100; dims[2] = 3; oVariable = new IONVariable(farr, dims);
IDL Online Help (March 06, 2007)