Fortran Problems

Dominique d'Humières dominiq@lps.ens.fr
Wed Mar 21 18:36:00 GMT 2018


Hi Martin,

> Hi! l installed Fortran on my computer and I wanted to do 32767+1 with Integer(2)
>  [to see that this exercise will be -32768] but Ubuntu said that I have an overflow error.

This has nothing to do with Ubuntu. Computing 32767+1 with Integer(2) is invalid in Fortran.

> PD: I don't know how can I disable the option '-fno-range-check' and internet couldn't help me

If nevertheless you still want to compute 32767+1 with Integer(2), you can do it (and get -32768) by enabling (not disabling)  the option '-fno-range-check’ .

Cheers,

Dominique




More information about the Fortran mailing list