Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29273 Discussions

Need advice for converting string prameters to variables

pecan204
Beginner
388 Views
Looking for some advice on converting a read in string of parameters to a read list of variables?

I have a file that has field names that was read from another file. These field names look like:

'time gtkw stm1 dum2 dum4 dum1 pcd tcd dum2 ttx dpex pt'

and after being read as a string they have the single quotes.

Is there a straightforward way to convert these string names into a variable name to be read from another file like below?

OPEN (6,FILE=TRIM(filepath),STATUS='unknown',FORM='formatted', SHARE='denywr')

Read(6,*) time gtkw stm1 dum2 dum4 dum1 pcd tcd dum2 ttx dpex pt

Thanks
0 Kudos
0 Replies
Reply