079. Substrings of character variable arrays#
topic: Character variables
Note
This tip is a draft1.
For variables
character (len=10) :: s, v(5)
s(2:4) is the substring from positions 2 to 4 and v(1:3)(2:4) is an array of substrings from positions 2 to 4 of the elements v(1) to v(3).
For variables
— FortranTip (@fortrantip) January 6, 2022
character (len=10) :: s, v(5)
s(2:4) is the substring from positions 2 to 4 and v(1:3)(2:4) is an array of substrings from
positions 2 to 4 of the elements v(1) to v(3). pic.twitter.com/h5AIaZwYL2
- 1
From the perspective of FortranTip Browser, “draft” means that it hasn’t been edited for formatting, hasn’t had corresponding Fortran programs added, the text content hasn’t been enhanced, etc. Draft texts are extracted from the corresponding Tweet using the Twitter API.