Validates the data entered in an F_SHORT field
| Call | ||
| #include <vv_short.h> | ||
| int vf_short(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 short integer field to validate | |
| UCHAR *cvbufp | Pointer to conversion buffer | |
| Returns | ||
| 1 | The data is valid for this F_SHORT field. | |
| 0 | The data is invalid for this F_SHORT field. | |
| Description
vf_short() 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_short() checks for: | Message: | |
| Decimal separator(s) | NO_DECPOINT | |
| Exponential notation symbol (E) | NO_EXP | |
| Multiple signs | MULT_SIGN | |
| Embedded signs | SIGN_FIRST | |
| Embedded blanks (accepted between sign | NO_BLANKS | |
| and first digit) | ||
| The value is outside the range specified for | OUTOFRANGE | |
| this field or is too large or small to convert | ||
| to a short integer. | ||
| Vermont Views validation messages are defined in vv_valmsg.c. | ||
| Related Functions
vf_bool(), vf_ch(), vf_date(), vf_dec(), vf_fill(), vf_double(), vf_long(), vf_req(), vf_st(), vf_time() |
||