next up previous contents
Next: Relational Operators 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.


next up previous contents
Next: Relational Operators Up: Intrinsic Character Operations Previous: Character Substrings

Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 15:03:35 GMT 1996
Not for commercial use.