c     PROGRAM sequential input list to i * j array

c     ------------------------------------------------------------------

c     Program will ignore all lines beginning with character c.


c     Convert a list form to an array 10 * i long.

c     where i = total number of lines / 10

c     e.g. 6385 lines long will give i = 639

c     6385 = 10 * 639

c     If you work in DOS it all hinges on the 64K memory segment boundary

c     so you may need to alter the file.


c     ------------------------------------------------------------------

      integer i, j, k

      character*9 word, arai(639,10)

c     Alter ? in character*? to num. of characters per line in input.txt

      open(1, file='input.dat')

      open(2, file='output.dat')

      print*,'Beginning processing'

c     i is the number lines on the resultant output.txt file

      do 10 i = 1,639

c     j is the number of entries per line from input.txt in ouput.txt

      do 20 j = 1,10

      k = k + 1


      arai(i,j) = word

   20 continue

c     add or remove the arai(i,*) as needed. Here there are 10 in the

c     array so arai(i,*) appears 10 times. * = 1, 2, .....



   10 continue



      print*,'Processing complete'

    5 format(a)

c     You can also alter 15 format(a.....) by adding or removing a to

c     the number of entries per line j. since j = 10 there are 10 a's.

   15 format(a,a,a,a,a,a,a,a,a,a)