[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+-----------+##############################################################
#+-| RECSIZE() |---------------------------------------------------+##########
#| +-----------+ Returns the size of a record in the current alias |##########
#+-----------------------------------------------------------------+##########
##############################################################################
##############################################################################
#+--| Summary |------------------+############################################
#| #INCLUDE database.hdr |############################################
#+-------------------------------+############################################
##############################################################################
##############################################################################
#+--| Syntax |-----------------------------+##################################
#| FUNCTION UINT recsize PROTOTYPE |##################################
#+-----------------------------------------+##################################
##############################################################################
##############################################################################
##################+---| Description |-----------------------+#################
##################| The recsize() function returns the size |#################
##################| of a record in the current alias |#################
##################+-----------------------------------------+#################
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Calculate number of records that can be added to |#########
#########| * the database before the disk is full. |#########
#########| |#########
#########| total_recs = diskspace(curdrive()) / recsize() |#########
#########+----------------------------------------------------------+#########
##############################################################################
##############################################################################
#########+--| Example 2 |-------------------------------------------+#########
#########| * Program prints record size of any database. |#########
#########| * Usage: recsize <filename> |#########
#########| |#########
#########| #include database.hdr |#########
#########| #include string.hdr |#########
#########| |#########
#########| DBFDEF tmp && no fields are required |#########
#########| ENDDEF |#########
#########| |#########
#########| PROCEDURE force_main |#########
#########| PARAMETER CONST CHAR(127) command_line |#########
#########| USE ltrim( command_line ) ALIAS tmp |#########
#########| ? recsize() |#########
#########| ENDPRO |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
diskspace()
filesize()
header()
reccount()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson