×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
James Rich wrote:
On Mon, 9 Feb 2004, Hans Boldt wrote:
Note that any operations with binary decimal numeric type involve an
implicit conversion to packed decimal numeric type. That will slow down
any operation involving binary.
Is this only with binary type, or does this also happen with integer type?
And, what is the difference between integer and binary? AFAIK, both int
and binary store numbers as a straightforward binary representation, i.e.
0001 for 1 or 0101 for 5 (of course with leading zeros to fill up 4
bytes).
The implicit conversion to packed decimal happens only with binary
decimal format (and zoned decimal format). Operations on integer and
unsigned values occur in integer or unsigned form whenever possible.
(However, if an operand of a numeric expression is decimal, the operands
are converted to decimal. Likewise, if an operand of a numeric
expression is in float format, the other operands are converted to
float. Check the Reference manual for further details.)
Yes, both binary decimal and integer represent numbers in two's
complement form. But binary decimal caps the values to a range of
-999999999 to 999999999 to assure functional compatibility with the
other decimal types. Integer format allows the full range of two's
complement values.
Cheers! Hans
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.