Create, Use And Destroy A 2d Array

[Solved] Create, Use And Destroy A 2d Array | Fortran - Code Explorer | yomemimo.com
Question : create, use and destroy a 2d array

Answered by : mackerel

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

Source : | Last Update : Wed, 09 Jun 21

Answers related to create, use and destroy a 2d array

Code Explorer Popular Question For Fortran