Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>fcount()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
FCOUNT()


Syntax:     FCOUNT()

Purpose:    To return the number of fields in the current database file
            structure.

Returns:    An integer value.

            FCOUNT() returns the number of fields of the database file
            open in the current work area.  If there is no database file
            open, FCOUNT() returns zero.

Usage:      FCOUNT() is useful in applications where you have created
            data independent programs that can operate on any database
            file.  These include generalized import/export and reporting
            programs.  Typically, you can use FCOUNT() to establish the
            upper limit of FOR...NEXT or DO WHILE loops that process a
            single record at a time.

Library:    CLIPPER.LIB


----------------------------------- Examples -------------------------------

   USE Sales
   ? FCOUNT()                          && Result: 5
   COPY STRUCTURE EXTENDED TO Temp
   USE Temp
   ? LASTREC()                         && Result: 5

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

   USE Sales
   DECLARE field_array[FCOUNT()]
   AFIELDS(field_array)


See Also: FIELD() TYPE()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson