Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.4j

Application v 5.22b

  

 

Chapter FiveGeneral Functions (continued)

BinaryPutSegment Function

Overview

The BinaryPutSegment function directly places a binary image of data into a specified area of a variable (memory).

Syntax/Parameters

Syntax

int = BinaryPutSegment ( param target, param source, [int position], [int size] );

Parameters

target

A parameter as variable data. The binary content of which will be altered. If a string type is supplied, the zero terminating byte is not included in the size.

source

A parameter as literal, variable data or handle. The binary content of which will be placed into data. If a string type (or literal) is supplied, the zero terminating byte is not included in the size.

position

An int specifying the zero-based position in bytes to put the new information within data.

size

An optional int specifying the size of source in bytes. If omitted, the default size of source is used. For string types, the size of the string less the zero terminator will be used, for other arrays, the entire allocated array is used.

Return Value

Returns an int as ERROR_NONE on success or a formatted error code on failure.

Remarks

The entirety or specified size of the source data is placed into the data memory at the specified position.

Put segment is meant to copy data from a source and place it into a destination target buffer. The source and target parameters cannot be the same variable,

Source information can be a variable or a Data Object.

Related Functions

Platform Support

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

Legato IDE, Legato Basic