Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter FourFlow Control (continued)

SetSessionValue Function

Overview

The SetSessionValue function sets the value for a named session data entry.

Syntax/Parameters

Syntax

int = SetSessionValue ( [string group], [string section], string name, param data );

Parameters

group

An optional string specifying a qualifying group. The value cannot be larger than 127 bytes.

section

An optional string specifying a qualifying section. The value cannot be larger than 127 bytes.

name

A string specifying the name of the value. The value cannot be larger than 127 bytes.

data

A parameter as a string or integer base value. If a literal integer value is used, it will be treated as an int base type. For strings, the maximum size allowed is 1MB.

Return Value

Returns an int as ERROR_NONE or a formatted error code on failure. Use the GetLastError function to retrieve a formatted error code and GetLastErrorMessage to retrieve additional details.

Remarks

An empty string for section or group is the same as not providing the parameter. However, the section and group parameters are not required to use the function. Exceeding 127 bytes for any name component will result in a runtime error.

The data parameter is stored according to the following rules:

–  When a string is specified for the data parameter, it is added verbatim to the session data pool.

–  Signed numeric type value such as int, data is converted to a string decimal value.

–  Unsigned data types such as word or dword, data is converted to string hexadecimal.

–  A literal numeric value is treated as a signed integer, this also includes TRUE and FALSE.

In addition to the data value, the entry is also time stamped with the system tick count and script handle.

Related Functions

Platform Support

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

Legato IDE, Legato Basic