Fvall
, Fvall32
-return long value of field occurrence
#include <stdio.h>
#include "fml.h"
long
Fvall(FBFR *fbfr, FLDID fieldid, FLDOCC oc)
#include "fml32.h"
long
Fvall32(FBFR32 *fbfr, FLDID32 fieldid, FLDOCC32 oc)
Fvall
() works like Ffind
(3) for long and short values, but returns the actual value of the field as a long, instead of a pointer to the value. fbfr is a pointer to a fielded buffer. fieldid is a field identifier. oc is the occurrence number of the field.
If the specified field occurrence is not found, then 0 is returned. This function is useful for passing the value of a field to another function without checking the return value. This function is valid only for fields of type FLD_LONG
or FLD_SHORT
.
Fvall32
is used with 32-bit FML.
For fields of types other than FLD_LONG
or FLD_SHORT
, Fvall
() returns 0 and sets Ferror
to FTYPERR
.
This function returns 0 on other errors and sets Ferror
to indicate the error condition.
Under the following conditions, Fvall
() fails and sets Ferror
to:
[FALIGNERR]
[FNOTFLD]
[FBADFLD]
[FTYPERR]
FLD_SHORT
or FLD_LONG
.
Fintro
(3), Ffind
(3), Fvals
(3)