I wrote a subroutine wich returns variablenames 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 worked wasthe following code, wich 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)