Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter FiveGeneral Functions (continued)

CommandLineToTable Function

Overview

The CommandLineToTable function returns the command line as a series of table entries.

Syntax/Parameters

Syntax

string[][] = CommandLineToTable ( [string data] );

Parameters

data 

An optional string containing a structured command line. If omitted, the program entry command line will be used.

Return Value

Returns a string table with parsed command line entries or an empty array on failure. Use the GetLastError and GetLastErrorMessage to retrieve a formatted error code and error detail, respectively. The last error and message can be used to check for syntax errors and the position of the first error.

Remarks

The table contains three column key names:

param  — The parameter name.

value  — The parameter value.

x      — the zero-based x position of the start of the parameter within the command line.

Depending on the platform and how the script was started, the script filename itself may be the first parameter if the default command line is used. If the script is embedded into the .exe, the script name will not be in the parameter list.

A modest level of error checking is performed during the load process but not all syntax error cases are checked. Duplicate parameter names will be added to table. Items are added in the order they are parsed.

Related Functions

Platform Support

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

Legato IDE, Legato Basic