GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
Overview
The Get16String function retrieves a 16-bit wstring from a buffer at a specified byte position for a specified length.
Syntax/Parameters
Syntax
wstring = Get16String ( buffer data, int position, [int characters] );
Parameters
data
A buffer as bytes, chars, string, any variable type or to a Data Object. This is referenced on a byte by byte position to read all bytes.
position
An int specifying a zero-based position in bytes. This should point to the start of the data for the wstring. If the position plus the size of the data element is outside of the scope of the buffer, a range error will be returned.
characters
An optional int specifying the number of characters to retrieve. If omitted, the value defaults to the total buffer size less the specified position.
Return Value
Returns a wstring comprised of the data read or empty on failure. Use the GetLastError function to retrieve error information.
Remarks
The Get16String function allows a script to reach into a buffer, access a specific set of characters that presumably make up a string.
If the source information contains a zero word, it will terminate the returned string at that position. Should the specified area not contain an ending zero word, one will automatically be added.
When the source data is a string or wstring type, the allowed data range is the allocated string size, not the string length (the character count to the terminating zero).
Use the GetLastError, IsError or IsNotError functions to differentiate between a return value of an empty string and an error.
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.