PURPOSE

Flen, Flen32 - return len of field occurrence in buffer

SYNOPSIS

#include <stdio.h>
#include "fml.h"
int Flen(FBFR *fbfr, FLDID fieldid, FLDOCC oc)
#include "fml32.h"
long Flen32(FBFR32 *fbfr, FLDID32 fieldid, FLDOCC32 oc) 

DESCRIPTION

Flen() finds the value of the specified field occurrence in the buffer and returns its length. fbfr is a pointer to a fielded buffer. fieldid is a field identifier. oc is the occurrence number of the field.

Flen32 is used with 32-bit FML.

RETURN VALUES

On success, Flen() returns the field length.

This function returns -1 on error and sets Ferror to indicate the error condition.

ERRORS

Under the following conditions, Flen() fails and sets Ferror to:

[FALIGNERR]
"fielded buffer not aligned" The buffer does not begin on the proper boundary.

[FNOTFLD]
"buffer not fielded" The buffer is not a fielded buffer or has not been initialized by Finit().

[FNOTPRES]
"field not present" A field occurrence is requested but the specified field and/or occurrence was not found in the fielded buffer.

[FBADFLD]
"unknown field number or type" A field identifier is specified which is not valid.

SEE ALSO

Fintro(3fml),
Fnum(3fml),
Fpres(3fml)