Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter FiveGeneral Functions (continued)

DataObjectSetSize Function

Overview

The DataObjectSetSize function sets the end of position or size of the Data Object. If reallocation is required, it is automatically performed.

Syntax/Parameters

Syntax

int = DataObjectSetSize ( handle hData, int size );

Parameters

hData

A handle specifying the Data Object.

size

An int specifying the new size of the object. If the size exceeds the current allocation size, the object is reallocated using the default expansion method. If a no over-allocation is desired, change the sign of the value.

Return Value

Returns an int as the total bytes allocated within the Data Object or zero on failure. Use the GetLastError function to retrieve a formatted error code.

Remarks

The size parameter specifies the actual number of bytes used within the Data Object. The allocated size is normally higher and performed in 4K or 8K byte segments or even higher depending on how many times the script requests expansion. If the size parameter is set to a negative value, the function will overallocate by the minimum chunk.

Related Functions

Platform Support

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

Legato IDE, Legato Basic