Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor II
2 Views

Data statement creation

I would like to be able to create, at compile time, a big data statement using values stored in a file.  I want to do it this way rather than have the file read at run time.  Is it possible (on Windows)?

Thanks

Gib

0 Kudos
3 Replies
Highlighted
New Contributor II
2 Views

I think I can now answer my

I think I can now answer my own question - I can create the data statement in a file that is then #INCLUDEd.

0 Kudos
Highlighted
Black Belt
2 Views

I will caution you that very

I will caution you that very large DATA statements may cause compiles to be very slow. The data file read in during execution might be a better idea if this happens.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
New Contributor II
2 Views

Thanks Steve.  I've changed

Thanks Steve.  I've changed the formulation, and now it's feasible to compute the values on the fly as needed.

0 Kudos