I’m working some legacy code, and just recently realized that there are many places in the code where integers are used where reals should be. e.g. :
real::varA, varB varA = 10^18 varB = 10^18.0 print *, varA print *, varB
The above is just an example, but the original authors of the code meant for varA to be 1E-18 and not zero. And, this is affecting the results of the program.
Is there any compiler switch or any other way to either a) automatically cast integer constants up to reals ( e.g. 18 -> 18.0) or b) at least stop compilation with an error so that I can manually correct these lines?