📜  创建、使用和销毁二维数组 - Fortran 代码示例

📅  最后修改于: 2022-03-11 15:01:04.860000             🧑  作者: Mango

代码示例1
PROGRAM Example
    IMPLICIT NONE
    INTEGER :: rows, columns, errcheck
    INTEGER, ALLOCATABLE :: array(:,:)
    
    rows = 5
    columns = 10
    ALLOCATE (array(rows,columns), STAT=errcheck) ! STAT is optional and is used for error checking
    array(3, 3) = 999
    WRITE(*,*) array(3, 3)
    DEALLOCATE (array, STAT=errcheck)
END PROGRAM Example