$FUNCNAME$
  FCOUNT()
$CATEGORY$
  DATABASE
$SUMMARY$
   Return the number of fields in the current .dbf file
$LANG_RU$
        (.dbf) .
$SYNTAX$
     FCOUNT() --> nFields
$LANG_RU$
     FCOUNT() -->  
$RETURNS$
     FCOUNT() returns the number of fields in the database file in the
     current work area as an integer numeric value.  If there is no database
     file open, FCOUNT() returns zero.
$LANG_RU$
     FCOUNT()       ,  
           .  
        , FCOUNT()  .
$DESCRIPTION$
     FCOUNT() is a database function.  It is useful in applications
     containing data-independent programs that can operate on any database
     file.  These include generalized import/export and reporting programs.
     Typically, you use FCOUNT() to establish the upper limit of a FOR...NEXT
     or DO WHILE loop that processes a single field at a time.

     By default, FCOUNT() operates on the currently selected work area.
$LANG_RU$
     FCOUNT()    .    
     ,        .
            / 
      .

       FCOUNT()    
        FOR...NEXT  DO WHILE,   
        .   FCOUNT()    
     ()  .      
     ,  ,     
             .
$EXAMPLES$
       This example illustrates FCOUNT(), returning the number of
	fields in the current and an unselected work area:

	USE Sales NEW
	USE Customer NEW
	? FCOUNT()                     // Result: 5
	? Sales->(FCOUNT())            // Result: 8

       This example uses FCOUNT() to DECLARE an array with field
	information:

	LOCAL aFields := ARRAY(FCOUNT())
	AFIELDS(aFields)

       This example uses FCOUNT() as the upper boundary of a FOR loop
	that processes the list of current work area fields:

	LOCAL nField
	USE Sales NEW
	FOR nField := 1 TO FCOUNT()
	   ? FIELD(nField)
	NEXT
$LANG_RU$
       ,  FCOUNT()     
          :

       USE Sales NEW
       USE Customer NEW
       ? FCOUNT()                   // : 5
       ? Sales->(FCOUNT())          // : 8

         ,   FCOUNT(),  
               :

       LOCAL aFields := ARRAY(FCOUNT())
       AFIELDS(aFields)

           FCOUNT()  
         FOR...NEXT      
        :

       LOCAL nField
       USE Sales NEW
       FOR nField := 1 TO FCOUNT()
	  ? FIELD(nField)
       NEXT
$SEEALSO$
  AFIELDS(),FIELDNAME(),TYPE()
$END$
