Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter FiveGeneral Functions (continued)

Get64Float Function

Overview

The Get64Float function retrieves a 64-bit floating-point number from a buffer at a specified byte position.

Syntax/Parameters

Syntax

float = Get64Float ( buffer data, int position );

Parameters

data

A buffer as bytes, chars, string or a handle to a Data Object. This is referenced on a byte by byte position to read two bytes to create the 64-bit float.

position

An int specifying a zero-based position in bytes. This should point to the start of the data for the word. If the position plus the size of the data element is outside of the scope of the buffer, a range error will be returned.

Return Value

Returns a float comprised of the data read or NaN on failure. Use the GetLastError function to retrieve error information.

Remarks

The Get64Float function allows a script to reach into a buffer, access a specific section of bytes and read it into an floating-point number. Note that it is possible to retrieve data that results in invalid floating-point number without an error being generated. Therefore, use the GetLastError, IsError, or IsNotError function to differentiate between a return value of NaN and an error.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic