Hi all,
I just discover than the sum intrinsic function use the type of the array ( I guess) to do the sum and therefor if the array is longer than the max value of type. I don't know if that is defined in the standard, is there a solution to this other than custom sum function ?
program sum1 integer(1),dimension(200) :: int1 integer(2),dimension(200000) :: int2 int1=1 int2=1 print *,sum(int1) print *,sum(int2) end program
Gives the results -56 3392.
Thanks for your thoughts on this.
P.