Converting a String to a Decimal

The jomDecimalFromString call, shown in the following example, converts a String representation of a floating‑point value to a Decimal value.

bool jomDecimalFromString(const Character string[], 
                          DskDecimal* pResult);

The parameters for this call are listed in the following table.

Parameter Description
string Buffer containing the text value
pResult

Decimal primitive type value resulting from the String conversion

Only US-ASCII characters in the range 0 through 9 are recognized.

The string can contain an optional prefix of tab and space characters, an optional sign, a series of digit values, or an optional decimal point followed by a series of digits. The first unrecognized character ends the conversion. If the string cannot be converted to a Decimal primitive type, false is returned.