program struct_test type other_struct real :: var1 real :: var2 integer :: int1 end type other_struct type my_struct ! Declaration of a Derived Type integer :: i real :: r real*8 :: r8 real, dimension(100,100) :: array_s ! Uses stack real, dimension(:), allocatable :: array_h ! Uses heap type(other_struct), dimension(5) :: meta_data ! Structure end type my_struct ! Use derived type for variable "a" type(my_struct) :: a ! ... write(*,*) "i is ",a%i ! Structures (variables) of the the derived type my_struct type(my_struct) :: data type(my_struct), dimension(10) :: data_array end program struct_test