Luke Deller
2006-12-14 12:21:48 UTC
Hi,
In omniORB (v4.1), the CORBA::Fixed constructor skips leading and
trailing zeros when constructing a fixed-point value from a string.
The code in corbaFixed.cc seems to do this quite deliberately, but I
think it is wrong:
Both the C++ and Python language mappings describe this string argument
with the phrase "the string representation of a fixed-point literal".
The CORBA specification (v2.6, sec 3.9.2) gives specific examples of
fixed-point literals, illustrating that leading and trailing zeroes are
significant.
Regards,
Luke.
**********************************************************************************************
Important Note
This email (including any attachments) contains information which is
confidential and may be subject to legal privilege. If you are not
the intended recipient you must not use, distribute or copy this
email. If you have received this email in error please notify the
sender immediately and delete this email. Any views expressed in this
email are not necessarily the views of XPlan Technology.
It is the duty of the recipient to virus scan and otherwise test the
information provided before loading onto any computer system.
Xplan Technology does not warrant that the
information is free of a virus or any other defect or error.
**********************************************************************************************
In omniORB (v4.1), the CORBA::Fixed constructor skips leading and
trailing zeros when constructing a fixed-point value from a string.
CORBA.fixed('0123d').precision() # should be 4
3CORBA.fixed('12.340d').decimals() # should be 3
2The code in corbaFixed.cc seems to do this quite deliberately, but I
think it is wrong:
Both the C++ and Python language mappings describe this string argument
with the phrase "the string representation of a fixed-point literal".
The CORBA specification (v2.6, sec 3.9.2) gives specific examples of
fixed-point literals, illustrating that leading and trailing zeroes are
significant.
Regards,
Luke.
**********************************************************************************************
Important Note
This email (including any attachments) contains information which is
confidential and may be subject to legal privilege. If you are not
the intended recipient you must not use, distribute or copy this
email. If you have received this email in error please notify the
sender immediately and delete this email. Any views expressed in this
email are not necessarily the views of XPlan Technology.
It is the duty of the recipient to virus scan and otherwise test the
information provided before loading onto any computer system.
Xplan Technology does not warrant that the
information is free of a virus or any other defect or error.
**********************************************************************************************