4D v16.3

Arrays

Home

 
4D v16.3
Arrays

Arrays  


 

 

An array is an ordered series of variables of the same type. Each variable is called an element of the array. The size of an array is the number of elements it holds. An array is given its size when it is created; you can then resize it as many times as needed by adding, inserting, or deleting elements, or by resizing the array using the same command used to create it.

You create an array with one of the array declaration commands. For details, see the Creating Arrays section.

Elements are numbered from 1 to N, where N is the size of the array. An array always has an element zero that you can access just like any other element of the array, but this element is not shown when an array is present in a form. Although the element zero is not shown when an array supports a form object, there is no restriction in using it with the language. For more information about the element zero, see the Using the element zero of an array section.

Arrays are 4D variables. Like any variable, an array has a scope and follows the rules of the 4D language, though with some unique differences. For more information, see the Arrays and the 4D Language and Arrays and Pointers sections.

Arrays are language objects; you can create and use arrays that will never appear on the screen. Arrays are also user interface objects. For more information about the interaction between arrays and form objects, see the Arrays and Form Objects section.

Arrays are designed to hold reasonable amounts of data for a short period of time. However, because arrays are held in memory, they are easy to handle and quick to manipulate. For details, see the Arrays and Memory section.



See also 

QUERY WITH ARRAY
STRING LIST TO ARRAY

 
PROPERTIES 

Product: 4D
Theme: Arrays

 
HISTORY 

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)