program MAKE_DATA c Author: Glen Cowan c Date: 21 August, 1999 c Test program to make a simple data set and write it to a file. implicit NONE c Constants integer num_points parameter (num_points = 11) c Local variables character*80 outfile integer i integer lun ! logical unit number for output file real x real x_max real x_min real y real z c Initialize some variables and open output file x_min = 0. x_max = 10. lun = 20 outfile = 'test_data.dat' open (unit = lun, file = outfile, form = 'formatted', & status = 'unknown', carriagecontrol = 'list') c Make the data and write to file do i = 1, num_points x = (x_max - x_min)*FLOAT(i-1)/FLOAT(num_points-1) + x_min y = 2.*x z = x**2 write (lun, *) x, y, z end do c Close up close (lun) stop END