Is initializing a variable in between variable declarations forbidden?

后端 未结 3 1203
日久生厌
日久生厌 2021-01-23 09:42

I have something like

integer a
integer b 
b = 0
integer c

a = 0
c = 0

which does not work with the error

\"A specific

3条回答
  •  梦毁少年i
    2021-01-23 10:37

    The error message is quite clear. Fortran programs and subprograms are divided into two parts. First the specification part where you use modules, define variables, derived types, interfaces... And then the executable part where you put the actual executable statements or control structures.

    It is not possible to mix them.

提交回复
热议问题