GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
Overview
The BinaryCompareNoCase function compares two buffers of binary data without regard to text case and returns a result of the comparison.
Syntax/Parameters
Syntax
int = BinaryCompareNoCase ( param a, param b, [int size] );
Parameters
a b
Parameters as literal or variable data. The binary content of which will be used for the comparison.
size
An optional int specifying the size or area to compare in bytes. Size cannot be larger than the size of the smaller of a or b in bytes. If omitted, the smaller of a or b is used as the size. If a string type is used as a variable, the size is calculated as the string length (to the terminating zero byte but not including the zero byte).
Return Value
Returns an int as -1, 0 or 1 depending on whether a < b, a == b or a > b, respectively or a formatted error code on failure. The GetLastError function can be used to retrieve error information and also will contain the size of the buffer tested. The IsError or IsNotError functions can be used to determine if an error occurred (testing a -1 condition as the return value will result in a false positive).
Possible errors returned are all related to the size of the buffers. If size is specified and is larger than either a or b, an ERROR_RANGE will be returned and if size is negative (other that -1 for default), an ERROR_RANGE will also be returned. The lower word of the error will contain the parameter that failed as 1, 2, or 3 for a, b, and size respectively.
Remarks
Strings are always treated as a zero-terminated for the purposes of sizing, even if the allocated amount is larger that the data content.
The comparison is on a byte by byte basis. If the characters are in the range of A-Z, a-z, or ANSI latin, they are compared without regard to their respective case.
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.