MEMO SIZE()

From Lianjapedia
Jump to: navigation, search

PURPOSE

Return the size of a memo field

SYNONYM

api_memo_size()

SYNOPSIS

#include "lianja_api.h"
 
int	MEMO_SIZE(fldname)
 
<input parameters>
char	*fldname;	/* Address of a buffer containing the name of a memo field	*/
 
<output parameters>
none

DESCRIPTION

The MEMO_SIZE() function will return the number of bytes that the specified memo field is occupying in the memo file. A value of -1 will be returned if the field is not a MEMO.

EXAMPLE

The following example returns the number of bytes in the memo field specified in the first parameter passed.

#include "lianja_api.h"
 
lianjaapi_memo_size()
{
	int	memosize;
 
	if (_parinfo(1)  == API_CTYPE ) {
       memosize = MEMO_SIZE(_parc(1));
 
    } else {
	memosize = -1;
    }
 
       _retni(memosize);
}

SEE ALSO

BLOB_SIZE(), DBF_RECCOUNT(), DBF_RECSIZE(), MEMO_MLCOUNT(), MEMO_READ(), MEMO_RECLAIM(), MEMO_UPDATE(), MEMO_WRITE()