program character_examples implicit none character (len=20):: name, string character(len=3)::one,two,three integer:: name_length ! print *,'input your first name' read'(a)',name ! ! example of len_trim, substrings and string ! concatenation ! name_length=len_trim(name) print*,name,' is here' print*,name(1:name_length),' is here' ! ! example of string concatenation ! one = 'a' two = 'cat' three = 'sat' string = one//two//' '//three print*,string end program character_examples