A built-in function or method is required to convert a numeric value in exponential form to decimal - OpenEdge Development - Products Enhancements - Progress Community

 OpenEdge Development

A built-in function or method is required to convert a numeric value in exponential form to decimal

We encountered a problem when obtaining a JSON array containing elements of the Decimal type that have a value in exponential form - today there no built-in functionality available in ABL  to convert exponential notation to decimal value.

When we try to use the GetDecimal () method, we see:

"Cannot transform JSON number value to ABL decimal value, JSON value has an exponent."

From the response of technical support: "As we are a database / business language, floating point is seldom used in that world. ".

But this is not so. In this case, the OpenEdge application is a banking application that works with stock and currency markets, so an exponential form is often used.

Comments
  • Both GetDecimal  in Json, but also DECIMAL("123.45e12")