File: file_42.f90

package info (click to toggle)
lfortran 0.60.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 58,416 kB
  • sloc: cpp: 173,406; f90: 80,491; python: 17,586; ansic: 9,610; yacc: 2,356; sh: 1,401; fortran: 895; makefile: 38; javascript: 15
file content (28 lines) | stat: -rw-r--r-- 737 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
program bnbz2
  implicit none

! Specify blank mode via OPEN statement

  integer :: iunit
  integer :: i1, i2
  character(8) :: blank_mode

  open (newunit=iunit, file='bnbz.dat', status='unknown')
  write (iunit,'(a)') '1   1   '
  close (iunit)

  open (newunit=iunit, file='bnbz.dat', status='old', blank='null')
  read (iunit, '(2i4)') i1, i2
  if (i1 /= 1 .or. i2 /= 1) error stop
  inquire (unit=iunit, blank=blank_mode)
  if (blank_mode /= 'NULL') error stop
  close (iunit)

  open (newunit=iunit, file='bnbz.dat', status='old', blank='zero')
  read (iunit, '(2i4)') i1, i2
  if (i1 /= 1000 .or. i2 /= 1000) error stop
  inquire (unit=iunit, blank=blank_mode)
  if (blank_mode /= 'ZERO') error stop
  close (iunit)

end program