Closed
Description
I don't think Fortran's use of integer unit numbers for file connections is ideal. This cannot be changed, but I suggest that stdlib have a file derived type to encapsulate the unit number and other properties of a file. It would have attributes found in the OPEN statement and could look like
type, public :: file
character (len=1000) :: name
integer :: unit
character (len=100) :: action
character (len=100) :: status
character (len=100) :: access
character (len=100) :: form
end type file
Users could declare type(file)
variables and pass them, instead of unit numbers or file names, to subroutines.
Metadata
Metadata
Assignees
Labels
No labels