4D v16.3

Table

Home

 
4D v16.3
Table

Table 


 

Table ( tableNum | aPtr ) -> Function result  
Parameter Type   Description
tableNum | aPtr  Longint, Pointer in Table number, or Table pointer, or Field pointer
Function result   Longint, Pointer in Table pointer, if a Table number is passed
Table number, if a Table pointer is passed
Table number, if a Field pointer is passed

The Table command has three forms:

  • If you pass a table number in tableNumTable returns a pointer to the table.
  • If you pass a table pointer in aPtrTable returns the table number of the table.
  • If you pass a field pointer in aPtrTable returns the table number of the field.

This example sets the tablePtr variable to a pointer to the third table of the database:

 TablePtr:=Table(3)

Passing tablePtr (a pointer to the third table) to Table returns the number 3. The following line sets TableNum to 3:

 TableNum:=Table(TablePtr)

This example sets the tableNum variable to the table number of [Table3]:

 TableNum:=Table(->[Table3])

This example sets the tableNum variable to the table number of the table to which the [Table3]Field1 field belongs:

 TableNum:=Table(->[Table3]Field1)



See also 

Field
Get last table number
Pointers
Table name

 
PROPERTIES 

Product: 4D
Theme: Structure Access
Number: 252

This command can be run in preemptive processes

 
HISTORY 

Created: < 4D v6

 
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)