ISUPASCIItoBCD

Converts a string of ASCII digits to a binary-coded decimal string.

Prototype

U8 TXISUPAPIFUNC ISUPASCIItoBCD ( U8 *ascii, U8 *bcd, U8 length)

Argument

Description

ascii

Pointer to NULL terminated ASCII string.

bcd

Pointer to destination string.

length

Number of bytes in destination.


Return values

ISUPASCIItoBCD returns the number of successfully converted digits if successful. If unsuccessful, this function returns a zero.

void prtTknAddr(TknStr *tk1, char* name)
{
   U8         *called = “8479258900”;
   U8          cdPty[20];
   U8          cdPtyLen = 0;
   U8         *calling = “8479258901”;
   U8          cgPty[20];
   U8          cgPtyLen = 0;
   S16        switchType = ST_ANSI92;
   SiConEvnt iamEvnt;

   cdPtyLen = ISUPASCIItoBCD(called, cdPty, 20);
   cgPtyLen = ISUPASCIItoBCD(calling, cgPty, 20);
   ….
   ….