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>bof()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
BOF()


Syntax:     BOF()

Purpose:    To determine if an attempt has been made to SKIP past the
            beginning of the current database file.

Returns:    A logical value.

            BOF() returns true (.T.) only when you attempt to move the
            record pointer before the first logical record in the
            current database file.  When this happens, the record
            pointer is positioned to the first logical record.  If the
            current database file contains no records, both BOF() and
            EOF() return true (.T.).

            Note that SKIP is the only record movement command that can
            set BOF() true (.T.).

Usage:      BOF() is generally used as a boundary condition test in
            applications where you need to move the record pointer
            backwards through the database file.  A simple application
            is a descending order record list without a descending order
            index file.  A more sophisticated application is a screen
            paging routine that pages forward or backward through the
            current database file based on the key you press.  You would
            use BOF() here to test when you have reached top-of-file.

Library:    CLIPPER.LIB


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

   USE Sales
   GO TOP
   ? RECNO()               && Result: 1
   ? BOF()                 && Result: .F.
   *
   SKIP -1
   ? RECNO()               && Result: 1
   ? BOF()                 && Result: .T.


See Also: SKIP EOF()

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