Skip to main content
Version: 21 R3

Table

Table ( tableNum : Integer ) : Pointer
Table ( tablePtr : Pointer ) : Integer
Table ( fieldPtr : Pointer ) : Integer

ParameterTypeDescription
tableNumInteger→Table number
tablePtrPointer→Table pointer
fieldPtrPointer→Field pointer
Function resultPointer, Integer←Table pointer, if a Table number is passed
Table number if a Table pointer or a Field pointer is passed

Description​

The Table command has three forms:

  • If you pass a table number in tableNum, Table returns a pointer to the table.
  • If you pass a table pointer in tablePtr, Table returns the table number of the table.
  • If you pass a field pointer in fieldPtr, Table returns the table number of the field.

Example 1​

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

 TablePtr:=Table(3)

Example 2​

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

 TableNum:=Table(TablePtr)

Example 3​

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

 TableNum:=Table(->[Table3])

Example 4​

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
Last table number
Table name

Properties​

Command number252
Thread safeyes