Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter Twenty-threeXBRL Functions (continued)

XBRLCompareFactValues Function

Overview

The XBRLCompareFactValues function compares two values with optional precision and tolerance.

Syntax/Parameters

Syntax

int = XBRLCompareFactValues ( string value_a, string value_b,
                         [string precision_a], [string precision_a],
                         [int tolerance] );

Parameters

value_a

A string containing a representation of a monetary facts value.

value_b

A string containing a representation of a monetary facts value.

precision_a

An optional string containing the precision for value_a. If omitted, the default value is ‘0’.

precision_b

An optional string containing the precision for value_ab. If omitted, the default value is ‘0’.

tolerance

An optional int value specifying the level of tolerance in digits. The default value, is 0 or exact.

Return Value

An int as -1, 0, 1 or a formatted error code on failure. The extended error message will contain further information on the error.

Remarks

Data values are compared after adjusting common precision and then tolerance. The result:

a < b  returns -1

a = b  returns  0

a > b  returns  1

The difference on the check is placed in the last error message.

Rounding is performed using the “Half to Even” method. See 4.6.7.1 ‘Correct to n Significant Figures’, ‘Rounding’ and ‘Truncation’ in the XBRL 2.1 Specification.

Related Functions

Platform Support

GoFiler Complete, GoFiler Corporate, GoXBRL