dc_toshort()

Converts a string in a field to a short integer variable

Call
#include <vv_short.h>
int dc_toshort(stp, datap, dfldp, cvbufp)

UCHAR *stp

Pointer to string with user's field input

PTR *datap Pointer to variable to receive converted field input
DFIELDPTR dfldp Pointer to a data field structure
PTR *cvbufp Pointer to a data conversion buffer
Returns  
1 Success. This is the only return value for this function
Description

dc_toshort() makes a copy of the input string in the conversion buffer. All embedded blanks and thousands separators are deleted from the buffer, and the resulting string is converted to a short integer value. The short integer value is then placed in the data variable.

Related Functions

dc_frshort(), vf_short()

Cautions

No error checking is performed on the input string. The function dc_toshort() assumes that vf_short() has already validated the string.


Home Contents Previous Next