Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - bof() determine if beginning of file is encountered http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 bof()               Determine if beginning of file is encountered
------------------------------------------------------------------------------
 Declaration
   database.hdr

 Syntax
   func logical bof extern

 Arguments
   None.

 Return
   A logical indicating if the record pointer is at the beginning of file.

 Description
   The bof() function returns .t. if the last skip operation for the current
   alias tried to skip beyond the first record, i.e. the beginning of the
   file (BOF). The BOF flag is cleared on the next successful skip operation.

   When programming with multiple aliases, use of the abof() function
   instead of the bof() function may create more readable code, and does
   not require to select an alias before checking for the BOF condition.

 Example
   #define EXAMPLE_DATABASE
   #include example.hdr

   proc Test_bof
   open sTest
   goto bottom
   ? bof()                    // prints .f.
   goto top
   ? bof()                    // prints .f.
   skip -1
   ? bof()                    // prints .t.
   endproc

   proc main
   Test_bof()
   endproc

See Also: abof() eof() skip

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