MEMO MLCOUNT()

From Recital Documentation Wiki
Jump to: navigation, search

PURPOSE

Return the number of lines in a memo


SYNONYM

api_memo_mlcount()


SYNOPSIS

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


DESCRIPTION

This function will return the number of lines in the specified memo field for the currently selected database.

The line length of the memo field is defined with the Recital command SET MEMOWIDTH. The MEMOWIDTH is also affected by the setting of the Recital command SET MEMOFORMAT, if ON lines are word wrapped.

NOTE: MEMOFORMAT should be either be left turned on or off. You should not toggle between settings as the formatting in the memo will be lost.


EXAMPLE

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

#include "dbapi.h"
 
dbapi_memo_mlcount()
{
    int	numlines;
 
    if (_parinfo(1) == API_CTYPE ) {
       numlines = MEMO_MLCOUNT(_parc(1));
    } else {
       numlines = 0;
    }
 
    _retni ( numlines );
}


SEE ALSO

BLOB_SIZE(), DBF_RECCOUNT(), FIELD_COUNT(), MEMO_MLINE(), MEMO_READ(), MEMO_RECLAIM(), MEMO_SIZE(), MEMO_UPDATE(), MEMO_WRITE()