Next: Simple Input / Output
Up: Expressions and Assignment
Previous: Intrinsic Logical Operations
Consider,
CHARACTER(LEN=*), PARAMETER :: str1 = "abcdef"
CHARACTER(LEN=*), PARAMETER :: str2 = "xyz"
substrings can be taken,
- str1 is `abcdef'
- str1(1:1) is `a' (not str1(1) -- illegal)
- str1(2:4) is `bcd'
The concatenation operator, //, is used to join two
strings.
PRINT*, str1//str2
PRINT*, str1(4:5)//str2(1:2)
would produce
abcdefxyz
dexy
For more information, click here
Next: Simple Input / Output
Up: Expressions and Assignment
Previous: Intrinsic Logical Operations
©University of Liverpool, 1997
Wed May 28 23:37:18 BST 1997Not for commercial use.