C5_HEADER

 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 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()

 

One response to “C5_HEADER

  1. Pingback: C5 File Management | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.