Table

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 3


Table (tableNum | aPtr) Pointer | Number

ParameterTypeDescription
tableNum | aPtrNumber | PointerTable number, or
Table pointer, or
Field pointer
Function resultPointer | NumberTable pointer, if a Table number is passed
Table number, if a Table pointer is passed
Table number, if 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 aPtr, Table returns the table number of the table.

If you pass a field pointer in aPtr, Table returns the table number of the field.

Examples

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

   TablePtr:=Table(3)

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)

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

   TableNum:=Table(->[Table3])

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

Count tables, Field, Pointers, Table name.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next