-
Key: CORBA23-222
-
Legacy Issue Number: 1667
-
Status: closed
-
Source: Anonymous
-
Summary:
Summary: I"m preparing a proposal to "fix" fixed point types, but I"d like to
outline what I am thinking before I have it completed, in order to give
people a chance to comment.
Michi has pointed out a few issues with the fixed point constant
grammar, but I think I can resolve those pretty easily by making changes
so that fixed point constants are only allowed to be defined using the
syntax:const fixed FOO = 1.2D;
Some people have expressed the idea that the fixed point type
specification is lacking sufficient semantic content, and they are
afraid that since different languages or even implementations of
languages might do the math differently that portability or
interoperability is affected. Frankly, I don"t see the problem as
serious for the CORE RTF. In most cases, the fixed point type is mapped
to the native fixed point facility of the language. If that isn"t
sufficiently robust to support stuff like banking applications, the CORE
RTF can"t do much to fix it anyway.For the C++ RTF:
For the C++ binding, of course, things are broken. However, I think I
may have a solution to the problem:First, define a new class CORBA::FixedValue which is used as the results
of all of the Fixed arithmetic operations, as well as for the type for
fixed point constants. FixedValue would store the digits and scale
information dynamically. All of the defined fixed point types would be
convertable from/to the FixedValue type, with the DATA_CONVERSION
exception available to signal overflow.Second, get rid of the explicit reference to a template type. Since the
grammar will be changed to no longer allow anonymous fixed point
declarations (as parameter types), there is no longer a specific need to
define the exact type name for the Fixed types, and in fact,
implementations no longer must implement fixed as a template type. -
Reported: CORBA 2.2 — Mon, 13 Jul 1998 04:00 GMT
-
Disposition: Duplicate or Merged — CORBA 2.3
-
Disposition Summary:
No Data Available
-
Updated: Sat, 7 Mar 2015 02:37 GMT