From: VICTOR on
Hi,

i have a variable whose maximum value is 36,012. I have declared the
variable as INTEGER(I4B), and i receive the runtime error of "Integer
Overflow". I am confused because as far as i know the INTEGER(I4B)
type can have values up to 2,147,483,647. Can anyone give me a clue ?
Regards,

Victor

Ps: the code is 20 - 30,000 lines long
From: steve on
On Apr 29, 9:15 am, VICTOR <victor.hera...(a)gmail.com> wrote:
> Hi,
>
> i have a variable whose maximum value is 36,012. I have declared the
> variable as INTEGER(I4B), and i receive the runtime error of "Integer
> Overflow". I am confused because as far as i know the INTEGER(I4B)
> type can have values up to 2,147,483,647. Can anyone give me a clue ?
> Regards,
>

program test
integer, parameter :: i4b = 2
integer(i4b) i
print *, huge(i)
end program test
laptop:kargl[214] gfc4x -o z y.f90
laptop:kargl[215] ./z
32767

--
steve