GetDouble Function

Action

Retrieves a double value (8-byte floating-point value) from a specified data structure at a specified position. You must declare a BDL string before using this function.

Include file

Kernel.bdh

Syntax

GetDouble( in sString : string,in nPos : number ): float;

Return value

double value

Parameter Description
sString BDL string corresponding to the data structure
nPos Starting position in the BDL string, where the first position is 1 (not 0)

Example

dcltrans
  transaction TGetDouble
  const    SIZE_STRUCT := 32;
  var    myBDLstring : string(SIZE_STRUCT);
    fValue : float;
  begin
    ...
    // Retrieve an 8-byte floating point value from position 8
    // in the BDL string myBDLstring and thereby (through mapping) 
get
    // the element myDouble in Struct1
    fValue := GetDouble(myBDLstring, 8);
    write("myDouble = "); write(fValue); writeln;
  end TGetDouble;

Output

myDouble = 754.294000