Assume I have a text file called 'text.txt' which contains:
&A S = 'Hi!' /
The following code produces different output depending on which line is commented out for the definition of S. I thought allocatable characters were accepted in namelist groups?
PROGRAM P IMPLICIT NONE !CHARACTER(LEN=50) :: S CHARACTER(LEN=:),ALLOCATABLE :: S NAMELIST /A/ S OPEN(UNIT=10,FILE='test.txt') READ(10,NML=A) WRITE(*,*) S END PROGRAM P