diff options
Diffstat (limited to 'example_packages/version_file/app')
-rw-r--r-- | example_packages/version_file/app/main.f90 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/example_packages/version_file/app/main.f90 b/example_packages/version_file/app/main.f90 new file mode 100644 index 0000000..fcf8d64 --- /dev/null +++ b/example_packages/version_file/app/main.f90 @@ -0,0 +1,13 @@ +program stub + implicit none + logical :: exists + integer :: unit + character(len=100) :: line + inquire(file="VERSION", exist=exists) + if (.not.exists) error stop "File VERSION does not exist." + open(file="VERSION", newunit=unit) + read(unit, '(a)') line + close(unit) + + print '(*(a))', "File VERSION contains '", trim(line), "'" +end program stub |