> I have the following problem: I want to set-up a large PARAMETER
> array of derived type, and I need a separate line for each element.
> The problem now is that Fortran 90/95 only allows 39 continuation
> lines, but I need something like 120. Any ideas how to solve this?
RESHAPE is your friend. Here's what I use for special functions:
real(kind=double), parameter :: B_00_1 = 0.334838697910949386_double
real(kind=double), parameter :: B_01_1 = -0.055187482048730095_double
real(kind=double), parameter :: B_02_1 = 0.004510190736011502_double
...
real(kind=double), parameter :: B_20_1 = 0.000000000000000000_double
real(kind=double), parameter :: B_00_2 = -0.112592935345473830_double
real(kind=double), parameter :: B_01_2 = 0.036557001742820941_double
...
real(kind=double), parameter :: B_20_6 = -0.000000000000000001_double
real(kind=double), dimension(0:20,6), parameter :: &
B = reshape ( (/ &
B_00_1, B_01_1, B_02_1, B_03_1, B_04_1, B_05_1, B_06_1, &
B_07_1, B_08_1, B_09_1, B_10_1, B_11_1, B_12_1, B_13_1, &
B_14_1, B_15_1, B_16_1, B_17_1, B_18_1, B_19_1, B_20_1, &
B_00_2, B_01_2, B_02_2, B_03_2, B_04_2, B_05_2, B_06_2, &
B_07_2, B_08_2, B_09_2, B_10_2, B_11_2, B_12_2, B_13_2, &
B_14_2, B_15_2, B_16_2, B_17_2, B_18_2, B_19_2, B_20_2, &
B_00_3, B_01_3, B_02_3, B_03_3, B_04_3, B_05_3, B_06_3, &
B_07_3, B_08_3, B_09_3, B_10_3, B_11_3, B_12_3, B_13_3, &
B_14_3, B_15_3, B_16_3, B_17_3, B_18_3, B_19_3, B_20_3, &
B_00_4, B_01_4, B_02_4, B_03_4, B_04_4, B_05_4, B_06_4, &
B_07_4, B_08_4, B_09_4, B_10_4, B_11_4, B_12_4, B_13_4, &
B_14_4, B_15_4, B_16_4, B_17_4, B_18_4, B_19_4, B_20_4, &
B_00_5, B_01_5, B_02_5, B_03_5, B_04_5, B_05_5, B_06_5, &
B_07_5, B_08_5, B_09_5, B_10_5, B_11_5, B_12_5, B_13_5, &
B_14_5, B_15_5, B_16_5, B_17_5, B_18_5, B_19_5, B_20_5, &
B_00_6, B_01_6, B_02_6, B_03_6, B_04_6, B_05_6, B_06_6, &
B_07_6, B_08_6, B_09_6, B_10_6, B_11_6, B_12_6, B_13_6, &
B_14_6, B_15_6, B_16_6, B_17_6, B_18_6, B_19_6, B_20_6 /),&
(/ 21, 6 /) )
I've never needed to do it recursively and it's certainly not
legible, but it should work.
--
Thorsten Ohl, Physics Department, TU Darmstadt -- [log in to unmask]
http://heplix.ikp.physik.tu-darmstadt.de/~ohl/ [<=== PGP public key here]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|