version 3
Count fields (tableNum | tablePtr) Number
Parameter | Type | Description | |
tableNum | tablePtr | Number | Pointer | Table number or Pointer to table | |
Function result | Number | Number of fields in table |
Description
The Count fields command returns the number of fields in the table whose number or pointer you pass in tableNum or tablePtr.
Fields are numbered in the order in which they are created.
Example
The following project method builds the array asFields, consisting of the field names, for the table whose pointer is received as first parameter:
$vlTable:=Table($1) ARRAY STRING(31;asFields;Count fields($vlTable)) For ($vlField;1;Size of array(asFields)) asFields{$vlField}:=Field name($vlTable;$vlField) End for
See Also
Count tables, Field name, GET FIELD PROPERTIES.