Re: Integers and standard
- From: "James Giles" <jamesgiles@xxxxxxxxxxxxxxxx>
- Date: Mon, 28 Jul 2008 23:07:47 GMT
Steven G. Kargl wrote:
...
Note, it does not use signed-int-literal-constant. More importantly
Z'80000000' will be converted to either an INTEGER(8) or INTEGER(16)
(depends on the hardware and I'm using gfortran's kind type parameter
values) value prior to the assignment.
j.f90:2.24:
data i/Z'80000000'/
1
Error: Arithmetic overflow converting INTEGER(16) to INTEGER(4) at (1)
I don't have gfortran installed, so I can't test it, but what does
it do if you overflow an integer expression at run-time? If
it doesn't abort then, why does it cause fatal error at compile-
time? The standard doesn't say what implementations should
do with overflow, but whatever it is should be consistent as
a quality of implementation issue.
--
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
.
- Follow-Ups:
- Re: Integers and standard
- From: Steven G. Kargl
- Re: Integers and standard
- From: Richard Maine
- Re: Integers and standard
- References:
- Integers and standard
- From: Alfredo Buttari
- Re: Integers and standard
- From: Richard Maine
- Re: Integers and standard
- From: glen herrmannsfeldt
- Re: Integers and standard
- From: Steven G. Kargl
- Integers and standard
- Prev by Date: Re: Integers and standard
- Next by Date: Re: Performance for standard operations in many subroutine calls
- Previous by thread: Re: Integers and standard
- Next by thread: Re: Integers and standard
- Index(es):
Relevant Pages
|