GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
Overview
The BinaryScan function scans a buffer of binary data looking for a pattern match and returns the position of the first match.
Syntax/Parameters
Syntax
int = BinaryScan ( param data, param pattern, [int start], [int end], [int size] );
Parameters
data
A parameter as literal or variable data. The binary content of which will be scanned. If a string type (or literal) is supplied, the zero terminating byte is not included in the size.
pattern
A parameter as literal or variable data. The binary content of which will be use as the pattern. If a string type (or literal) is supplied, the zero terminating byte is not included in the size.
start
An optional int specifying the zero-based starting position for the pattern match within data in bytes. If omitted, the value is zero.
end
An optional int specifying the zero-based ending position for the pattern match within data in bytes. If omitted or zero, the value is the size of data less the size of pattern.
size
An optional int specifying the size pattern in bytes. For string types, the size of the pattern less the zero terminator will be used, for other arrays, the entire allocated array is used.
Return Value
Returns an int as the matching zero-based index position within data or a formatted error code on failure. There are two basic error conditions: the scan failed to match the pattern or the parameters are out of range. The start, end and size parameter must be within the range of the size of data.
Remarks
A buffer can be sequentially scanned by using the returned match position + the start parameter + pattern size as the next index.
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.