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.3 . Guide To CA-Clipper - <b>lastrec()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 LASTREC()
 Determine the number of records in the current .dbf file
------------------------------------------------------------------------------
 Syntax

     LASTREC() | RECCOUNT()* --> nRecords

 Returns

     LASTREC() returns the number of physical records in the current database
     file as an integer numeric value.  Filtering commands such as SET FILTER
     or SET DELETED have no effect on the return value.  LASTREC() returns
     zero if there is no database file in USE in the current work area.

 Description

     LASTREC() is a database function that determines the number of physical
     records in the current database file.  LASTREC() is identical to
     RECCOUNT() which is supplied as a compatibility function.

     By default, LASTREC() 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).

     Note:  Although the functionality of RECNO() has been expanded to
     encompass the concept of "identity," the LASTREC() function continues to
     return only record numbers--not identities.  LASTREC() has no expanded
     functionality, so it is not "identity-aware."

 Examples

     .  This example illustrates the relationship between LASTREC(),
        RECCOUNT(), and COUNT:

        USE Sales NEW
        ? LASTREC(), RECCOUNT()            // Result: 84 84
        //
        SET FILTER TO Salesman = "1001"
        COUNT TO nRecords
        ? nRecords, LASTREC()            // Result: 14 84

     .  This example uses an aliased expression to access the number
        of records in a open database file in an unselected work area:

        USE Sales NEW
        USE Customer NEW
        ? LASTREC(), Sales->(LASTREC())

 Files   Library is CLIPPER.LIB.


See Also: COUNT EOF()

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