(Page 4 of 30 in this chapter)


SccpAsciiNumToBcd

Description

Converts the null-terminated ASCII string of decimal digits pointed to by pAscii to binary coded decimal format.

Prototype

SCCP_STATUS SccpAsciiNumToBcd (char *pAscii,

U8 *pBcdBuf,

U32 nBcdBufLen,

U32 *pnDigits )

pAscii The address of a null-terminated ASCII string of digits.

pBcdBuf The address of a buffer for the converted BCD number.

nBcdBufLen The number of bytes in the BCD buffer.

pnDigits The address where number of digits converted is to be returned.

Return Values

Details:

The results are placed in the buffer pointed to by pBcdBuf. If the length of the ASCII string is less than half the length of the BCD buffer, the BCD buffer is padded with BCD zeros. The number of digits converted is returned at the address pnDigits.



(Page 4 of 30 in this chapter)


tech_support@nmss.com
Copyright © 1999, Natural MicroSystems, Inc. All rights reserved.