beautypg.com

HP NonStop G-Series User Manual

Page 92

background image

Data Conversion Library

Data Conversion

6–6

110838 Tandem Computers Incorporated

nSignType

Display numeric sign type to be used for the converted
data:
TDMGW_CONV_NOT_SIGNED = No sign
TDMGW_CONV_SLI_SIGNED = Leading embedded sign
TDMGW_CONV_STI_SIGNED = Trailing embedded sign
TDMGW_CONV_SLS_SIGNED = Leading separate sign
TDMGW_CONV_STS_SIGNED = Trailing separate sign

nDecimalPlaces

Number of implied decimal places in the Tandem display
numeric.

TdmgwConvCfTextToTdmTwosComp

This function converts numeric strings in CF_TEXT clipboard format to Tandem two's
complement data representation.

Function Prototype

void FAR PASCAL TdmgwConvCfTextToTdmTwosComp

(char far * lpElementValue,

in

void far * lpTwosCompNumber,

out

int nTwosCompNumberLength,

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 number is too big to fit in a two's complement number of the length specified in
nTwosCompNumberLength, then the converted value will be invalid.

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

If the value of nDecimalPlaces is negative, then lpElementValue is scaled down before
conversion Effectively lpElementValue is divided by ten to the power of the absolute
value of nDecimalPlaces. For details on the scaling of two's complement numbers, see
the Tandem Data Definition Language (DDL) Reference Manual.

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.

lpTwosCompNumber

Pointer to the start of where the Tandem two's
complement number is placed.