GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
Overview
The HexToBuffer function converts a string of hexadecimal characters (two byte representations) into a specified variable. With the exception of strings, the data is read verbatim and treated as binary information.
Syntax/Parameters
Syntax
int = HexToBuffer ( string data, parameter name );
Parameters
data
A source string containing hexadecimal characters in pairs. The string can optionally contain spacing and padding, but the source bytes must not contain spaces. For example, “00 AA 22” is permissible but “0 0 A A 2 2” is not.
name
A variable name. It cannot be a literal or a calculated expression value. It can be of any type except it must be in contiguous storage. See Section 3.7 Contiguous Data for more information. The parameter is treated as a pointer to the area of memory where the variable is held. Strings are an exception in that they must be zero-terminated (see Remarks below).
Return Value
Returns an int containing the number of bytes read or an error code on failure. The data must fit into the target variable or ERROR_OVERFLOW will be returned.
Remarks
The HexToBuffer function can be used to move hexadecimal string data directly into variable or buffers. This function differs from most others in that the provided parameter is always a reference and its content will be altered by the function.
Destination string variables are not really appropriate to use with the HexToBuffer function but are allowed. Strings are processed in such a manner as to always ensure there is a zero-terminating byte. To force a string to be allocated to a specific size, use the PadString function.
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.