| 
 | 
The following function returns the number of fields connected to the given form.
SYNOPSIS
int field_count (form) FORMIf form is NULL, field_count returns -1.form;
As an example, consider the following routine, which determines whether your user is on the last field of the form as numbered in the field pointer array:
   int on_last_field (form)
   FORM * form;
   {
       /* fetch number of last field */
   
       int lastindex = field_count (form) - 1;
   
       /* determine whether number of current field
          is the same */
   
       return field_index (current_field (form)) == lastindex;
   }
Note the use of functions field_index and current_field, described in ``Manipulating the current field''.