Converts a long integer variable to a string for display in a field
| Call | |
| #include <vv_long.h> | |
| int dc_frlong(stp, datap, dfldp, cvbufp) | |
|
UCHAR *stp |
Pointer to a string buffer |
| PTR datap | Pointer to data variable containing a long integer |
| DFIELDPTR dfldp | Pointer to a data field structure |
| PTR cvbufp | Pointer to a data conversion buffer |
| Returns | |
| 1 | The long integer value was successfully converted to a string |
| 0 | The string is too large to fit in the field |
| Description
dc_frlong() converts the long integer number 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), then 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_frlong() 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_frlong() 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 |
|