Fortran PARAMETER variable initialized from input

前端 未结 3 1950
谎友^
谎友^ 2020-12-11 22:01

In Fortran, is the PARAMETER attribute set at runtime or compilation time? I was wondering if I can pass in the size the of the array at run time and have this

3条回答
  •  一整个雨季
    2020-12-11 22:39

    You need dynamic allocation if the size of your array is to be defined as runtime. All parameter (constants) must be defined as compiling time.

提交回复
热议问题