Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.2 . The Guide To CA-Clippe - <b>header()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 HEADER()
 Return the current database file header length
------------------------------------------------------------------------------
 Syntax

     HEADER() --> nBytes

 Returns

     HEADER() returns the number of bytes in the header of the current
     database file as an integer numeric value.  If no database file is in
     use, HEADER() returns a zero (0).

 Description

     HEADER() is a database function that is used with LASTREC(), RECSIZE(),
     and DISKSPACE() to create procedures for backing up files.

     By default, HEADER() operates on the currently selected work area.  It
     will operate on an unselected work area if you specify it as part of an
     aliased expression (see example below).

 Examples

     .  This example determines the header size of the Sales.dbf:

        USE Sales NEW
        ? HEADER()            // Result: 258

     .  This example defines a pseudofunction, DbfSize(), that uses
        HEADER() with RECSIZE() and LASTREC() to calculate the size of the
        current database file in bytes:

        #define DbfSize()   ((RECSIZE() * LASTREC()) + ;
              HEADER() + 1)

        Later you can use DbfSize() as you would any function:

        USE Sales NEW
        USE Customer NEW
        ? DbfSize()
        ? Sales->(DbfSize())

 Files:  Library is EXTEND.LIB.

See Also: DISKSPACE() LASTREC() RECSIZE()

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