Re: Max integer in an 8 byte COMP field?
- From: "Roger While" <simrw@xxxxxxxxxxxx>
- Date: Fri, 20 Apr 2007 20:14:36 +0200
Nope, intermediate computations can go to
a huge value. I think the standard has something
about this.
The object field is then relevant.
How this is handled is dependant on compile
options (at least with all Unix/Linux compilers
I have come across).
As I posted an interesting difference between MF/OC.
And as I said with compatibility mode compilation,
then you can not get more than 18 digits out
(and should NOT do the resultant move to the object field)
Roger
"Michael Mattias" <mmattias@xxxxxxxxxxxxxx> schrieb im Newsbeitrag
news:1V6Wh.17960$Um6.10930@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
RES1=0000000000000000000
RES1=0000000000000000000
What is correct I will leave the Gurus to work out :-)
Doesn't take a 'guru' at all.
compute rc2 = 2 ** 63.
...
compute rc2 = 2 ** 64 - 1.
Both these computations create intermediate overflow. See the ON SIZE
ERROR option for COMPUTE in your manual for handling of same.
--
Michael C. Mattias
Tal Systems Inc.
Racine WI
mmattias@xxxxxxxxxxxxxx
.
- References:
- Max integer in an 8 byte COMP field?
- From: Graham Hobbs
- Re: Max integer in an 8 byte COMP field?
- From: Roger While
- Re: Max integer in an 8 byte COMP field?
- From: Michael Mattias
- Max integer in an 8 byte COMP field?
- Prev by Date: Re: Max integer in an 8 byte COMP field?
- Next by Date: Re: Max integer in an 8 byte COMP field?
- Previous by thread: Re: Max integer in an 8 byte COMP field?
- Next by thread: Re: Max integer in an 8 byte COMP field?
- Index(es):