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

getFloat()

The getFloat() method returns the float value of the variable. If the value is not of type float, the scalar value is converted to a float.

Syntax

public final float getFloat()

Return Value

The method returns the float value of the variable.

Arguments

None.

Exceptions

IONIsAnArrayException, NumberFormatException

Example

try {  
float f = myVariable.getFloat();  
}catch(IONIsAnArrayException e){  
   System.err.println("Variable is an array");  
}catch(NumberFormatException e){  
   System.err.println("String Cannot be converted");  
}  

  IDL Online Help (March 06, 2007)