Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter Twenty-oneEDGARView Integration (continued)

EDGARValidateNumber Function

Overview

The EDGARValidateNumber function validates a string as complying with a specified numeric format.

Syntax/Parameters

Syntax

int = EDGARValidateNumber ( string data, int whole, int fraction, [dword type] );

Parameters

data

A string containing the target data to test.

whole

An int specifying the number of whole digits allowed.

fraction

An int specifying the number of fractional digits allowed.

type

A dword using bits to specify the rules for validation. See Remarks.

Return Value

An int as ERROR_NONE (0) or a formatted error code on failure. Use the GetLastErrorMessage function to get a text version of the error.

Remarks

This is a general purpose validator that is meant to cover the schema specified fields in some of the EDGAR XML specifications. The types are as follows:

  Definition   Bitwise   Description
  Formatting        
    EDGAR_NUM_FLAGS   0x00000000   Base Flag
    EDGAR_NUM_ALLOWSIGN   0x00000001   Can have +/-
    EDGAR_NUM_FORCESIGN   0x00000003   Must have +/-
    EDGAR_NUM_FORCEWD   0x00000004   Must have Whole Digit
    EDGAR_NUM_FORCEALLWD   0x0000000C   Must have All Whole Digits
    EDGAR_NUM_FORCEFD   0x00000010   Must have Fractional Digits
    EDGAR_NUM_FORCEALLFD   0x00000030   Must have All Fractional Digits
    EDGAR_NUM_FORCEALL   0x0000003C   Must have All Digits
  Special        
    EDGAR_NUM_NOZERO   0x00010000   Zero Not allowed
    EDGAR_NUM_FORCENEG   0x00020001   Should be Negative
    EDGAR_NUM_FORCEPOS   0x00040000   Should be Positive

 

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE