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 - reccount() return the number of records in the current alias http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 reccount()          Return the number of records in the current alias
------------------------------------------------------------------------------
 Declaration
   database.hdr

 Syntax
   func long reccount extern

 Arguments
   None.

 Return
   The number of records in the current alias.

 Description
   The reccount() function returns the number of physical records in the
   current alias. The set filter to and set delete commands do not affect the
   result of reccount(). Use the count to command if these conditions need
   to be regarded.

 Example
   #define EXAMPLE_DATABASE
   #include example.hdr

   proc Test_reccount
   vardef
      ulong nRecs
      uint  n
   enddef
   // back up a database after each 100+ records have been added
   open sTest
   nRecs := reccount()
   for n := 1 to 110
      append blank
   next
   if reccount() > nRecs + 100
      ? "backup necessary"
   endif
   endproc

   proc main
   Test_reccount()
   endproc

See Also: areccount()

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