vhdl_reference_93:file_types

File types

file of type_mark

Two file types string_file and natural_file are declared. They are to contain elements of the type string and natural .

TYPE string_file IS FILE OF string
TYPE natural_file IS FILE OF natural

A file type ft with elements of the type tm is declared.

In the procedure read the next value is to be read from a file.

In the procedure write a value is to be attached to a file.

The function endfile checks whether the end of a file has been reached.

TYPE ft IS FILE OF tm ;
 
PROCEDURE read (
      f     : IN   ft ;
      value  : OUT tm ;
      length : OUT natural ) ;
PROCEDURE write (
      f    : OUT ft ;
      value : IN   tm ) ;
FUNCTION endfile ( f : IN ft )
      RETURN boolean ;