Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter ThreeData Types and Operators (continued)

GetVariableSize Function

Overview

The GetVariableSize function returns the allocated size of a variable.

Syntax/Parameters

Syntax

int = GetVariableSize ( variable name );

Parameters

name

A name of a variable.

Return Value

Returns an int containing the size in bytes. Use the GetLastError and GetLastErrorMessage functions to retrieve additional information.

Remarks

The size returned is the raw size of the variable as referenced in the pool. Most variables will have management overhead associated that is not included in the size.

The GetVariableSize function is meant to be used with the GetVariablePointer function to aid in determining the size of writable or readable memory.

All non-dimensional numeric based variables will have a size of 8 bytes since internal numeric values are stored as 64-bit words.

Strings will include the terminate zero byte in the size as well as any over allocated area.

This function operates on certain variable types. Referencing a string that has not been initialize will result in an error.

Related Functions

Platform Support

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

Legato IDE, Legato Basic