(j3.2006) [Fwd: Fortran 2008 query]

Van Snyder Van.Snyder
Thu Oct 26 14:12:49 EDT 2017


I'm not the only one with this problem.

Can we make statement length ridiculously large in the next revision?

        I have a Fortran 2008 query I hope that you may help me with. I want to 
        have some very long (several thousand element) arrays containing data 
        values that are constants (these values are actually accurate values 
        that I am using to check the output from various algorithms against). 
        The 'obvious' way of doing this is to declare a large parameter array. e.g.,
        
             nmax = 4000
             real (kind = kind(0.0d0)), parameter :: accres(nmax) = [ &
                <lots of values> &
             ]
        
        To make this standard conforming the number of continuation lines is 
        restricted by the 2008 standard to 255 each with 132 characters. The 
        data has been calculated to 30 dp and I don't want to lose this accuracy.
        
        Is there any way, within the standard, that I can split the above into 
        several separate statements without using different array names?
        
        Pre-parameter statements I would have used a sequence of data statements 
        and set up values to successive blocks of the array. But PARAMETER is 
        better in that it is making the 'constant' nature of the array clear 
        which is not the case with DATA.





More information about the J3 mailing list