There is only one intrinsic character operator, the concatenation operator, //. Most string manipulation is performed using intrinsic functions.
CHARACTER(LEN=4), PARAMETER :: name = "Coal" CHARACTER(LEN=10) :: song = "Firey "//name PRINT*, "Rowche "//"Rumble" PRINT*, song(1:1)//name(2:4)
would produce
Rowche Rumble Foal
The example joins together two strings and then the first character of song and the 2nd, 3rd and 4th of name. Note that // cannot be mixed with other types or kinds.
Return to corresponding overview page