4D v14.3

ARRAY TEXT

Home

 
4D v14.3
ARRAY TEXT

ARRAY TEXT 


 

ARRAY TEXT ( arrayName ; size {; size2} ) 
Parameter Type   Description
arrayName  Array in Name of the array
size  Longint in Number of elements in the array or Number of rows if size2 is specified
size2  Longint in Number of columns in a two-dimensional array

 The ARRAY TEXT command creates and/or resizes an array of Text elements in memory.

  • The arrayName parameter is the name of the array.
  • The size parameter is the number of elements in the array.
  • The size2 parameter is optional; if size2 is specified, the command creates a two-dimensional array. In this case, size specifies the number of rows and size2 specifies the number of columns in each array. Each row in a two-dimensional array can be treated as both an element and an array. This means that while working with the first dimension of the array, you can use other array commands to insert and delete entire arrays in a two-dimensional array.

While applying ARRAY TEXT to an existing array:

  • If you enlarge the array size, the existing elements are left unchanged, and the new elements are initialized to "" (empty string).
  • If you reduce the array size, the last elements deleted from the array are lost.

This example creates a process array of 100 Text elements:

 ARRAY TEXT(atValues;100)

This example creates a local array of 100 rows of 50 Text elements:

 ARRAY TEXT($atValues;100;50)

This example creates an interprocess array of 50 Text elements and sets each element to the value “Element #” followed by its element number:

 ARRAY TEXT(◊atValues;50)
 For($vlElem;1;50)
    ◊atValues{$vlElem}:="Element #"+String($vlElem)
 End for

 
PROPERTIES 

Product: 4D
Theme: Arrays
Number: 222

 
HISTORY 

Created: < 4D v6

 
SEE ALSO 

ARRAY STRING

 
ARTICLE USAGE

4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)