vf_dec()

Validates the data entered in an F_DECIMAL field

Call
#include <vv_dec.h>
int vf_dec(stp, picp, dfldp, cvbufp)

UCHAR *stp

Pointer to the string containing the field data

UCHAR *picp Pointer to the picture associated with the string
DFIELDPTR dfldp Pointer to the decimal field to validate
UCHAR *cvbufp Pointer to conversion buffer
Returns
1 The data is valid for this F_DEC field.
0 The data is invalid for this F_DEC field
Description

vf_dec() performs several validation checks on the data. If the data does not pass a validation check, VAL_ERR is set. The form editor will then display the appropriate message. The following table lists the validation checks and the message displayed in the error window if the check fails.

vf_dec() checks for: Message:
Multiple decimal separators MULT_POINTS
Multiple signs MULT_SIGN
Exponential notation symbol (E) NO_EXP
Embeddedsigns SIGN_FIRST
Embedded blanks (accepted between sign and first digit) NO_BLANKS
Value is outside the range specified for this field or is too large or small to convert to a long integer. OUTOFRANGE
If CHKTRUNCATE is ON for the field, too many digits after the decimal point DECTRUNCATE
Vermont Views validation messages are defined in vv_valmsg.c.
Related Functions

vf_bool(), vf_ch(), vf_date(), vf_fill(), vf_double(), vf_int(), vf_long(), vf_req(), vf_st(), vf_time()


Home Contents Previous Next