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 - __field_eof eof field access setting http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 __field_eof         EOF field access setting
------------------------------------------------------------------------------
 Declaration
   database.hdr

 Syntax
   logical __field_eof

 Default
   .t. (no runtime error when accessing a field at EOF).

 Description
   The __field_eof system variable controls field access at the end of
   file. If the variable is set to .f., a runtime error will be generated
   when trying to access a database field while it is positioned at EOF.

 Example
   #define EXAMPLE_DATABASE
   #include example.hdr

   proc Test_field_eof
   open sTest                        // open database
   go bottom                         // go to last record
   ? recno(), eof(), sTest->lastname // print data
   skip                              // move pointer to end of file
   ? recno(), eof(), sTest->lastname // print data
   __field_eof := .f.                // set error generation on
   wait "Press a key to generate runtime error due to accessing field at EOF"
   ? sTest->lastname                 // access field and print error
   endproc

   proc main
   Test_field_eof()
   endproc

See Also: aeof() eof()

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