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()
Pingback: C5 File Management | Viva Clipper !