Evaluating a specific letter of a string defined in a derived type in Fortran90 [duplicate]
问题 This question already has answers here : Extract substring of Fortran string array (3 answers) Extract a single character from a Fortran string (1 answer) Access character at specific index in a string in Fortran (1 answer) Closed 1 year ago . I would like to evaluate if the 3rd letter of variable myline is 'C' or not. I try this: program main implicit none type line integer :: count = 5 character(len=48) :: list = 'ABCDE' end type type(line) :: myline character(len=1) :: letter = 'C' write(*