deccvasc()

Converts a string value to a decimal value.

Syntax

mint deccvasc(char *cp, mint len, dec_t *np);
  1. cp is a pointer to a string to be converted to a decimal value.
  2. len is the length of the string.
  3. np is a pointer to the decimal structure which contains the result of the conversion.

Returns

Table 1. Return codes
Code Description
0 The conversion was successful.
-1200 The number is too large to fit into a decimal type structure.