Solving Error "REAL Expression in DO Loop"

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 5K views
jcang
Messages
2
Reaction score
0
freal Loops?

Hi everybody..

I have a question.
Recently, I'm using g95 to run my Fortran 95 program.
But it occur an error, which is:

REAL expression in DO loop at <1> - to enable REAL loop parameters use -freal-loops

What is freal loop exactly?
and How to solve this problem?

Any help is appreciated.
Thanks.
 
Physics news on Phys.org


Do loops normally use integers. To allow "reals" (floating point) to be used in loops, you need to add a command line parameter when invoking the compiler.