Converts an integer variable to a string for display in a field
| Call | |
| #include <vv_int.h> | |
| int dc_frint(stp, datap, dfldp, cvbufp) | |
|
UCHAR *stp |
Pointer to a string buffer |
| PTR datap | Pointer to data variable containing an integer |
| DFIELDPTR dfldp | Pointer to a data field structure |
| PTR cvbufp | Pointer to a data conversion buffer |
| Returns | |
| 1 | The integer value was successfully converted to a string |
| 0 | The string exists, but it is too long to fit in the field |
| Description
dc_frint() converts the integer value to string format. If thousands separators are specified (THSEPARATOR is ON for the field), they are inserted as needed. If inserting thousands separators makes the string too long to fit in the field, they are not inserted. If right justification is set for the field (RTADJUST is ON), the string is shifted to the right. The string is checked to ensure that it will fit in the field. If it doesn't, dc_frint() returns a zero. If BLANKONZERO is ON and the value is zero, the returned string will only contain protected characters. All zeroes will have been replaced with spaces. |
|
| Related Functions | |
| Cautions
dc_frint() assumes that the string buffer is large enough to hold the resulting string, including a null terminator '/0'. A string that is too long for the field is not considered a fatal error. VV_ERR does not get set; therefore, the VCS error reporting system does not report this condition. |
|