Re: Max integer in an 8 byte COMP field?



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



.