4D v16.3

Get pointer

Home

 
4D v16.3
Get pointer

Get pointer 


 

Get pointer ( varName ) -> Function result 
Parameter Type   Description
varName  String in Name of a process or interprocess variable
Function result  Pointer in Pointer to process or interprocess variable

The Get pointer command returns a pointer to the process or interprocess variable whose name you pass in varName.

To get a pointer to a field, use Field. To get a pointer to a table, use Table.

Note: You can pass expressions such as, for example, ArrName+"{3}", as well as 2D array elements (ArrName+"{3}{5}") to Get pointer.
However, you cannot pass variable elements (ArrName+"{myVar}").

In a form, you build a 5 x 10 grid of enterable variables named v1, v2... v50. To initialize all of these variables, you write:

  ` ...
 For($vlVar;1;50)
    $vpVar:=Get pointer("v"+String($vlVar))
    $vpVar->:=""
 End for

Using pointers to elements of two-dimensional arrays:

 $pt:=Get pointer("a{1}{2}")
  //$pt=->a{1}{2}
 $pt2:=Get pointer("atCities"+"{2}{6}")
  //$pt2=->atCities{2}{6}



See also 

Field
Table

 
PROPERTIES 

Product: 4D
Theme: Language
Number: 304

This command can be run in preemptive processes

 
HISTORY 

Modified: 4D 2004
Modified: 4D v15

 
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)