xHarbour Reference Documentation > Function Reference |
Returns the number of fields in the current work area.
FCount() --> nFieldCount
The function returns a numeric value which is the number of field variables available in a work area. If a work area is not used, the return value is zero.
FCount() is used to determine how many fields, or field variables, exist in a work area. By default, the function operates in the current work area. Use an aliased expression to determine the number of fields in a different work area.
See also: | FIELD, FieldGet(), FieldName(), FieldType(), Type() |
Category: | File functions , Field functions |
Source: | rdd\dbcmd.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example shows a typical programming pattern for FCount() where // an array is filled with the names and contents of all fields. PROCEDURE Main LOCAL aArray, n USE Customer NEW aArray := Array( FCount() ) FOR n := 1 TO FCount() aArray[n] := { FieldName(n), FieldGet(n) } NEXT AEval( aArray, {|a| QOut( Padr(a[1],10)+":",a[2] ) } ) USE RETURN
http://www.xHarbour.com