beautypg.com

HP NonStop G-Series User Manual

Page 91

background image

Data Conversion Library

Data Conversion

110838 Tandem Computers Incorporated

6–5

lpAlphaNum

Pointer to the start of where the converted string is placed. For
SQL Varchar data structures, it points to the prefixed LEN
count.

nCString

Zero = Pad the converted value with trailing spaces up to
nAlphaNumLength bytes.

Nonzero = Terminate the converted value with a null character.

nVarchar

Zero = lpAlphaNum does not point to an SQL Varchar data
structure.

Non-zero = lpAlphaNum points to the start of an SQL Varchar
data structure.

nAlphaNumLength

Maximum number of characters to be converted. For SQL
Varchar structures, this includes the LEN count.

TdmgwConvCfTextToTdmDispNum

This function converts numeric strings in CF_TEXT clipboard format to Tandem
display numeric data representation. Display numerics are used in COBOL.

Function Prototype

void FAR PASCAL TdmgwConvCfTextToTdmDispNum

(char far * lpElementValue,

in

char far * lpDisplayNumber,

out

int nDisplayNumberLength,

in

int nSignType,

in

int nDecimalPlaces);

in

The lpElementValue numeric string is not validated. Invalid input data results in an
invalid conversion (or no conversion).

If nSignType is set to TDMGW_CONV_NOT_SIGNED and lpElementValue is
negative, then the sign is ignored.

If the resulting display numeric string has too many significant digits, then leading
digits are discarded.

If more decimal places are provided in lpElementValue than there are implied decimal
places specified with nDecimalPlaces, then extra decimal places are truncated.

Parameters

lpElementValue

Pointer to the null character terminated numeric string to
be converted. The string can be preceded by a sign and
contain a decimal point (such as -12, +42.76). No commas,
currency symbols, exponents, or other non-numeric
characters are allowed.

lpDisplayNumber

Pointer to the start of where the Tandem display numeric is
placed.

nDisplayNumberLength

Length of the converted data (includes any separate sign).