program template

implicit real*8 (a - h, o - z)
character*132 input, output
write (*, '(5x, a)') 'enter filespec of input file.'
read (*, '(a)') input
write (*, '(5x, a)') 'enter filespec of output file.'
read (*, '(a)') output
open (unit = 1, file = input, status = 'old')
open (unit = 2, file = output, status = 'unknown')

pi = 3.14159265358979d0
c = 2.99792458d10
h = 6.62606957d-27 ! CODATA 2010
an = 6.02214129d23 ! CODATA 2010
c2 = 1.4387770d0 ! CODATA 2010
r = 82.057361d0 ! CODATA 2010 derived
rk = 1.3806488d-16 ! CODATA 2010
du = 2.6867805d16 ! CODATA 2010 derived

i = 1
20  read (1, *, end = 30) x, y
  i = i + 1
  go to 20
30  npoints = i - 1

close (unit = 1)
close (unit = 2)
end