Next: Part III: Description of Data Structures
Up: 5 Diverse utilities
Prev: 5.3 Obtaining general information
Index
Contents
SUBROUTINE DEFDIR(,
,
,
)
INTEGER UNIT, IPGD, ILON, M(*)
It is advisable to call this utility after opening all the direct access files. In reality, it is only obligatory to call this utility before a call to modules using MEFDIR (manipulation of direct access files with the aid of utilities OUVDIR, LECDIR, ECRDIR, FERDIR, ..., is voluntarily omitted in this user guide). Since the implementation of the [Fortran 77] standard, it is possible to avoid the use of MEFDIR by using the OPEN, READ, WRITE and CLOSE commands directly.
SUBROUTINE OUVRIR(,
,
,
,
)
INTEGER UNIT, RECL, IOSTAT
CHARACTER*(*) FILE, SPEC
This utility opens a file (see also OUVRIS). The call to this utility ensures an improved portability than the direct use of the OPEN command.
These specifications can be given in any order, separated by commas, blanks being ignored.
The default values are those of the [Fortran 77] standard:
An example of a call:
CALL OUVRIR(10, 'POBA.DIRECT', 'OLD, DIRECT', 1024, IOSTAT)
SUBROUTINE OUVRIS(,
,
,
)
INTEGER UNIT, RECL
CHARACTER*(*) FILE, SPEC
This utility opens a file and stops execution in case of an error. It is therefore unnecessary for the programmer to do the following test:
CALL OUVRIR(UNIT,FILE,SPEC,RECL,IOSTAT)IF (IOSTAT.NE.0) CALL ARRET(IOSTAT)
SUBROUTINE TRUNIT()
INTEGER UNIT
This utility finds a free unit number, i.e. connected to no other file. It is often called before OUVRIR.