ARR. - Array Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Arrays and Data-Structures > Array -Commands > !INT-Arrays >

ARR. - Array Commands

ARR.ArrayToVarInt

Previous Top Next


SPR Script Language

 

ARR.ArrayToVarInt

Converts a global array of integers into a single, CR-LF delimited variable.

 

Intention

 

This command is a specialized version of ARR.ArrayToVar. It is designed to work with arrays that were populated with integer (QUAD) values using ARR.SetIntArray. It correctly reads the binary integer data from each array element, converts it to a readable string, and joins all the values into a single CR-LF delimited variable.

 

Syntax

 

ARR.ArrayToVarInt|Array-No.|$$DestVar

 

Parameter Explanation

 

P1 - Array-No. - (Numeric, Required)

The number (0-32) of the source global array containing integer data.

 

P2 - $$DestVar - (Variable, Required)

The variable where the final, CR-LF delimited result string will be stored.

 

Examples

 

'***********************************

' ARR.ArrayToVarInt - Sample 1: Displaying Integer Array Contents

'***********************************

' First, create and populate an array with integers

ARR.SetIntArray|1|1|100

ARR.SetIntArray|1|2|250

ARR.SetIntArray|1|3|-50

' Now, convert that array into a single string variable

ARR.ArrayToVarInt|1|$$res

' Display the results in a message box

MBX.Integer array contents:$$crlf$$$$res

ENR.

'

 

Remarks

 

- This command has an alias: ARR.ATVI.

- Using this command on an array that contains string or floating-point data will produce incorrect or meaningless results.

 

See also:

 

ARR.ArrayToVar

ARR.ArrayToVarFp

ARR.SetIntArray