Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter FiveGeneral Functions (continued)

FormatString Function

Overview

The FormatString function allows for multiple input parameters to be formatted into a string.

Syntax/Parameters

Syntax

string  = FormatString ( string format, [mixed parameters ... ] );

wstring = FormatString ( wstring format, [mixed parameters ... ] );

Parameters

format

A string containing a template that specifies the structure of the resulting string. See Section 5.2 String Functions for information on creating formatted strings. The type of variable used determines the resulting type.

parameters

One or more parameters to be formatted and inserted into format.

Return Value

Returns a string or wstring formatted as specified or an empty string on failure. Use the GetLastError function to retrieve error information.

Remarks

Formatted strings allow numeric and other data to be formatted into a string for appropriate display. The format of the string and the data to be inserted depend upon the structure of the format parameter and the contents of the additional parameters passed to the function. For more information on formatted strings, see Section 5.2 String Functions.

For string type, the total size of the returned string cannot be larger than 2MB. If it exceeds 2MB, the returned string will be “--error--” with an error set in both the program runtime log and in the last error. For wstring type, the total size of the returned string cannot be larger than 1M characters.

Related Functions

Platform Support

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

Legato IDE, Legato Basic