Skip to content

Derived type for file connections #398

Closed
@Beliavsky

Description

@Beliavsky

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions