4D v16.3ARRAY POINTER |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v16.3
ARRAY POINTER
|
ARRAY POINTER ( arrayName ; size {; size2} ) | ||||||||
Parameter | Type | Description | ||||||
arrayName | Array |
![]() |
Name of the array | |||||
size | Longint |
![]() |
Number of elements in the array, or Number of rows if size2 is specified | |||||
size2 | Longint |
![]() |
Number of columns in a two-dimensional array | |||||
The ARRAY POINTER command creates or resizes an array of Pointer elements in memory.
While applying ARRAY POINTER to an existing array:
This example creates a process array of 100 Pointer elements:
ARRAY POINTER(apValues;100)
This example creates a local array of 100 rows of 50 Pointer elements:
ARRAY POINTER($apValues;100;50)
This example creates an interprocess array of Pointer elements and sets each element pointing to the table whose number is the same as the element. The size of the array is equal to the number of tables in the database. In the case of a deleted table, the row will return Nil.
ARRAY POINTER(◊apValues;Get last table number)
For($vlElem;1;Size of array(◊apValues);1;-1)
If(Is table number valid($vlElem))
◊apValues{$vlElem}:=Table($vlElem)
End if
End for
Product: 4D
Theme: Arrays
Number:
280
Created: < 4D v6
4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)