HP Fortran Programmer's Reference (September 2007)

I/O and file handling
Example programs
Chapter 8 233
END IF
100 FORMAT (F16.6)
200 FORMAT (A, 2I6)
END PROGRAM main
Here are the command lines to compile and execute the program, along with the output from
a sample run. Output from the cat command shows the contents of the list file before and
after executing the program:
$ f90 file_access.f90
$ cat list
0.5
1.2
2.5
3.5
26.15
$ a.out
Enter number to insert in list: 4.7
STOP Inserted!
$ cat list
0.5
1.2
2.5
3.5
4.7
26.15