Hi all,
today I stumbled over an issue in the debugger extension into VS 2015 (update 1). I have a dereived type with again derived type sub-component which is allocatable. In a module I allocate this sub-component. The debugger shows a 'syntax error' in hover over. However, I'm not sure whether the code is conforming to standard.
program DerivedTypeAllocatableDebugger use mod_test use mod_allocate implicit none ! Variables! integer, parameter :: n = 10 ! ---------------------------------------------------------------------------------- ! Body of DerivedTypeAllocatableDebugger write(*,*) '*** DerivedTypeAllocatableDebugger ***' call sub_alloc(n,test_type) end program DerivedTypeAllocatableDebugger module mod_test implicit none type :: subdummy1 integer :: number character(len=80) :: name='' end type subdummy1 ! type :: subdummy2 integer :: number character(len=80) :: name='' character(len=2 ) :: site='' end type subdummy2 type :: dummy type(subdummy1),dimension(: ),allocatable :: planes type(subdummy2),dimension(:,:),allocatable :: lines end type dummy type(dummy) :: test_type end module mod_test module mod_allocate implicit none private public :: sub_alloc contains ! -------------------------------------------------------- subroutine sub_alloc(n,test_type) use mod_test, only : dummy implicit none ! parameter integer :: n type(dummy) :: test_type ! locals character(len=4) :: tdummy integer :: i ! ----------------------------------- allocate(test_type%planes(n)) do i = 1, n write(tdummy,'(i0.4)') i test_type%planes(i)%name = tdummy test_type%planes(i)%number = i end do return end subroutine sub_alloc ! -------------------------------------------------------- end module mod_allocate
The error looks like:
Any hint what is wrong?
EDIT: VS 2015 Update 1 + PSXE 2016 Update 1
Best regards Johannes