| 
                    
 This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com  | 
            |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
                 
                
  | 
                
					
                    
                         
    4D v20.6
 
Table 
                                
                                
        
 | 
                ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Table ( tableNum | aPtr ) -> Function result | ||||||||
| Parameter | Type | Description | ||||||
| tableNum | aPtr | Longint, Pointer | 
             
         | 
        Table number, or Table pointer, or Field pointer | |||||
| Function result | Longint, Pointer | 
             
         | 
        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:
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)
	Product:  4D
	Theme:  Structure Access
	Number:  
        252
        
        
        
	
	Created:  < 4D v6
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	4D Language Reference ( 4D v20)
	
	
	4D Language Reference ( 4D v20.1)
	
	
	
	4D Language Reference ( 4D v20.2)
	
	4D Language Reference ( 4D v20.3)
	
	4D Language Reference ( 4D v20.4)
	
	
	4D Language Reference ( 4D v20.5)
	4D Language Reference ( 4D v20.6)
	
	
	
Add a comment