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

 Syntax
   func uint recsize extern

 Arguments
   None.

 Return
   Record size.

 Description
   The recsize() function returns the size of a record in the current alias.

 Example
   #define EXAMPLE_DATABASE
   #include example.hdr

   dbfdef sTmp                  // no fields are required
   enddef
   
   proc Test_recsize
   // Calculate number of records that can be added to
   // the database before the disk is full.
   if exist( argv( 1 ) )
      open argv( 1 ) alias sTmp
      ? "Database", argv( 1 ), "contains", istr( reccount() ), "records"
      ? "Record size is", istr( recsize() )
      ? istr( diskspace( curdrive() ) / recsize() ), ;
         "more records will fit to disk",
   else
      ? "Program prints record size of any database"
      ? "Usage: recsize <filename>"
   endif
   endproc

   proc main
   Test_recsize()
   endproc

See Also: arecsize()

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