Re: Integers and standard



Dan Nagle wrote:
Hello,

On 2008-07-28 23:13:20 -0400, kargl@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
(Steven G. Kargl) said:

What does F2003 say about BOZ in INT(), REAL(), etc.?

They are the standard way of giving a type
to BOZ constants.


Sounds nice. But actually that rule is a mangling of the
semantics of those converson functions. In the special
case involved, those functions actually act as a form of
TRANSFER operation, instead of as conversions. Ironically,
one of the many places you still aren't allowed to use
BOZ constants is as the SOURCE argument to the TRANSFER
intrinsic.

But, in the context of this thread, I think S. Kargl was asking
what the rule was for things like: INT(Z'80000000'). In that
case, I think the rule is pretty clear that the value does *not*
overflow a 32-bit result. Of course, it's meaning depends
on what convention the implementation uses for the sign
bit (2's complement, 1's complement, signed magnitude, etc.).

--
J. Giles

"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies." -- C. A. R. Hoare

"Simplicity is prerequisite for reliability" -- E. W. Dijkstra


.


Quantcast