[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+-------------+############################################################
#+-| A_RECSIZE() |---------------------------------------------+##############
#| +-------------+ Returns record size for the specified alias |##############
#+-------------------------------------------------------------+##############
##############################################################################
##############################################################################
#+--| Summary |------------------+############################################
#| #INCLUDE database.hdr |############################################
#+-------------------------------+############################################
##############################################################################
##############################################################################
#+--| Syntax |-------------------------------+################################
#| FUNCTION UINT a_recsize PROTOTYPE |################################
#| PARAMETERS ALIAS aliasname |################################
#+-------------------------------------------+################################
##############################################################################
##############################################################################
###############+---| Description |----------------------------+###############
###############| The a_recsize() function returns the size of |###############
###############| a record in the specified alias. |###############
###############+----------------------------------------------+###############
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * Calculate number of records that can be added |#########
#########| * to the database before the disk is full. |#########
#########| |#########
#########| total_recs = diskspace(0) / 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 |#########
#########| ? a_recsize( tmp ) |#########
#########| 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