4D v15

RESOLVE POINTER

Home

 
4D v15
RESOLVE POINTER

RESOLVE POINTER  


 

 

RESOLVE POINTER ( aPointer ; varName ; tableNum ; fieldNum )

ParameterTypeDescription     
aPointerPointer->Pointer for which to retrieve the referenced object     
varNameString<-Name of referenced variable or empty string     
tableNumLongint<-Number of referenced table or array element, or 0 or -1     
fieldNumLongint<-Number of referenced field, or 0 or -1

Theme: Language

Starting with 4D v15, pointers to two-dimensional arrays are supported. For example, you can now write ->a{1}{2}.

As a result, when passing a pointer to an element of a two-dimensional array, the fieldNum parameter receives the element number of the second dimension. Also, RESOLVE POINTER now returns -1 instead of 0 in fieldNum for pointers to variables and single-dimension arrays.

The result table is now:

Referenced objectParameters
varNametableNumfieldNum
...
VariableName of the variable-1-1
Array elementName of the arrayElement number-1
2D Array elementName of the 2D arrayRow element numberColumn element number
...

Example  

Here is an example of a 2D array pointer:

 ARRAY TEXT(atCities;100;50)
 C_POINTER($city)
 atCities{1}{2}:="Rome"
 atCities{1}{5}:="Paris"
 atCities{2}{6}:="New York"
  // ...other values
 $city:=->atCities{1}{5}
 RESOLVE POINTER($city;$var;$rowNum;$colNum)
  //$var="atCities"
  //$rowNum="1"
  //$colNum="5"



See also 

Get pointer

 
PROPERTIES 

Product: 4D
Theme: Language

 
HISTORY 

 
ARTICLE USAGE

4D v15 - Upgrade (R-release edition) ( 4D v15)

Parent of : RESOLVE POINTER ( 4D v15)