GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
Overview
The Put32Float function puts a 32-bit floating to a buffer at a specified byte position.
Syntax/Parameters
Syntax
int = Put32Float ( buffer data, int position, float value );
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 write four bytes to create the 32-bit floating-point value.
position
An int specifying a zero-based position in bytes. This should point to the start of the data for the float. If the position plus the size of the data element is outside of the scope of the buffer, a range error will be returned.
value
A float value to place in the buffer. The value will be converted from a 64-bit to a 32-bit float thus loosing precision.
Return Value
Returns an int as ERROR_NONE or a formatted error code on failure.
Remarks
The Put32Float function allows a script to reach into a buffer and place a 32-bit floating-point value. Note that float value is internally converted from a 64-bit to 32-bit floating point number which will result in lose of precision and can lead to values that are out of range.
When adding to a single-dimension array, the axis depth is adjusted if the placement exceeds the last position. For other types or multiple dimensions, the axis depth is not adjusted. For automatically allocated arrays, the array size is not adjusted using this function. Any fraction amount of the data type size will push the depth plus one element.
The last position of the Data Object is also adjusted if the end position if the size of the value placed exceeds the last position.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.