This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com

Home

 
4D v19.8
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

 
PAGE CONTENTS 
 
HISTORY 

Modified: 4D 2004
Modified: 4D v15

 
ARTICLE USAGE

4D Language Reference ( 4D v19)
4D Language Reference ( 4D v19.1)
4D Language Reference ( 4D v19.4)
4D Language Reference ( 4D v19.5)
4D Language Reference ( 4D v19.6)
4D Language Reference ( 4D v19.7)
4D Language Reference ( 4D v19.8)