Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter FiveGeneral Functions (continued)

GetNumericWholePortion Function

Overview

The GetNumericWholePortion function tests a string as being numeric and returns the whole number portion of the value as a string.

Syntax/Parameters

Syntax

string = GetNumericWholePortion ( string data );

Parameters

data

A string containing a formatted number.

Return Value

Returns a string containing whole number 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 whole number digits (less sign).

Remarks

GetNumericWholePortion tests the incoming string for US accounting formatting, finds the decimal position and strips that section. If there is a syntax error, an empty string is returned and the error code placed in the last error. Not have 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, a negative value will always return using a dash (‘-’). 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-12-13