Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter FiveGeneral Functions (continued)

GetNumericDecimalPortion Function

Overview

The GetNumericDecimalPortion function tests a string as being numeric and returns the decimal portion of the number as a string.

Syntax/Parameters

Syntax

string = GetNumericDecimalPortion ( string data );

Parameters

data

A string containing a formatted number.

Return Value

Returns a string containing decimal portion of the data parameter or an empty string on failure. Use the GetLastError function to retrieve error information.

On success, the last error will contain the count of the number of decimal digits.

Remarks

GetNumericDecimalPortion tests the incoming string for US accounting formatting, finds the decimal position and returns that section. If there is a syntax error, an empty string is returned and the error code placed in the last error. Not having a decimal portion is not an error, the returned string will be empty and last error set to 0.

While negative numbers may be represented with a ‘-’ or in parenthesis, the return value will always be positive. Currency values are not stripped and will result in a syntax error.

Related Functions 

Platform Support

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

Legato IDE, Legato Basic

Page revised 2024-10-21