I'd like to define some length-two characters variables using DATA statements, concatenating two named constants referring to single characters, directly in the DATA statement.
Is it possible? If so, what is the correct syntax? Is there a better, concise way to do that?
Example
use m_ascii_chars ! this defines ch_* stuff as single character named constants
...
character(2) :: pairs(100)
...
DATA pair(1) / ch_plus // ch_verticalbar / ! would be the best one, but it does not work,
! given the meaning of the slash in the DATA
! statement
DATA pair(1) / ( ch_plus // ch_verticalbar ) / ! does not work !!
DATA pair(1) / [ ch_plus // ch_verticalbar ] / ! does not work !!
! This works, but it is rather verbose
DATA pair(1)(1:1) / ch_plus /
DATA pair(1)(2:2) / ch_verticalbar /
...
! Of course, this works too, but does not fit the requirements.
DATA pair(1) / '+|' /