PA_GetPointerTableField

4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next

version 2003


PA_GetPointerTableField (pointer; table; field)

ParameterTypeDescription
pointerPA_PointerThe 4D pointer
tableshort *Table number of the table pointed to by the pointer
fieldshort *Field number of the table pointed to by the pointer

Description

The routine PA_GetPointerTableField returns the table and field numbers that pointer references.

Depending on what kind of pointer pointer is, the returned values are:

Pointer kind*tNum*fNum
To FieldTable numberField number
To TableTable number0
else00

You can use PA_GetPointerKind to determine what kind of pointer the4Dptr is.

NOTE

4th Dimension pointers are not standard C pointers. They are structures that tell 4D to what kind of data they point: a table, a field, or a variable (process or interprocess).

Since a pointer does not have the same definition and use in interpreted and compiled mode, the developer should use the accessors of this API.

Example

Using the table number from a pointer to a table:

   /* . . . */
   if ( PA_GetPointerKind( a4Dptr ) == ePK_PointerToTable )
   {
      PA_GetPointerTableField(a4Dptr, &table, &field);
      /* . . . */
   }

See Also

PA_GetPointerKind, PA_GetPointerParameter, PA_GetPointerValue, PA_GetPointerVariable.

Error Handling

PA_GetLastError keeps the last error that occurred before calling the routine.


4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next