If I have some real vectors, say vector_a
, vector_b
, vector_c
, ...vector_n
, how can I use a character input (for example 'vector_a'
) for writing the real vector_a
?
This is an example:
DOUBLE PRECISION :: g_xx( Nx, Ny, Nz ), g_xy( Nx, Ny, Nz ), g_xz( Nx, Ny, Nz )
CHARACTER *10 :: g_ij
g_ij = 'g_xx'
PRINT*, MAXVAL( g_ij )
The last row is clearly wrong, because MAXVAL don't take in input a character.
How can I do?