FORTRAN compiler warning: obsolete arithmetic IF statement

前端 未结 3 953
被撕碎了的回忆
被撕碎了的回忆 2021-01-27 12:16

I have a gfortran error:

Warning: Obsolete: arithmetic IF statement at (1) 

What does this mean? In the source (old source):

6         


        
3条回答
  •  离开以前
    2021-01-27 12:35

    Check here:

    http://www.ibiblio.org/pub/languages/fortran/ch1-5.html

    "The Arithmetic IF is considered harmful."

    Your statement,

    if (s12 - 1.0) 13, 13, 12 is an Arithmetic IF, and is considered bad programming.

提交回复
热议问题