I wrote a subroutine wich returns variable names and values, both in an array. Now I want to declare variables which are in array1 to have values as are in array 2. How could I do this? The only thing that I got working was the following code, which is far from optimal:
Code:
filename='parameters.txt'
ParameterNames(1)='N2Opref'
ParameterNames(2)='N2Oesc'
ParameterNames(3)='De'
ParameterNames(4)='Det'
CALL readparam(filename,NumberOfParameters,ParameterNames,ParameterValues)
N2Opref=ParameterValues(1)
N2Oesc=ParameterValues(2)
De=ParameterValues(3)
Det=Parametervalues(4)