next up previous contents
Next: Simple Input / Output Up: Intrinsic Character Operations Previous: Character Substrings

Concatenation

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 gif


next up previous contents
Next: Simple Input / Output Up: Intrinsic Character Operations Previous: Character Substrings

©University of Liverpool, 1997
Wed May 28 20:20:27 BST 1997
Not for commercial use.