vhdl_reference_93:package_textio

Package TEXTIO

PACKAGE TEXTIO IS
 
  -- type definitions for text I/O :
  TYPE line IS ACCESS string;
  TYPE text IS FILE OF string;
  TYPE side IS ( right, left );
  SUBTYPE width IS natural;  
 
  -- standard text files :
  -- old VHDL'87 standard
   -- FILE input : text IS IN "std_input";
   -- FILE output : text IS OUT "std_output";
 
  -- new VHDL'93 standard
  FILE input : text OPEN READ_MODE IS "std_input";
  FILE output : text OPEN WRITE_MODE IS "std_output";
  -- input routines for standard types :
  PROCEDURE readline ( f : IN text; l : OUT line );
  PROCEDURE read ( l : INOUT line; value : OUT bit; good : OUT boolean );
  PROCEDURE read ( l : INOUT line; value : OUT bit );
  PROCEDURE read ( l : INOUT line; value : OUT bit_vector; good : OUT boolean);
  PROCEDURE read ( l : INOUT line; value : OUT bit_vector );
  PROCEDURE read ( l : INOUT line; value : OUT boolean; good : OUT boolean );
  PROCEDURE read ( l : INOUT line; value : OUT boolean );
  PROCEDURE read ( l : INOUT line; value : OUT character; good : OUT boolean);
  PROCEDURE read ( l : INOUT line; value : OUT character );
  PROCEDURE read ( l : INOUT line; value : OUT integer; good : OUT boolean );
  PROCEDURE read ( l : INOUT line; value : OUT integer );
  PROCEDURE read ( l : INOUT line; value : OUT real; good : OUT boolean );
  PROCEDURE read ( l : INOUT line; value : OUT real );
  PROCEDURE read ( l : INOUT line; value : OUT string; good : OUT boolean );
  PROCEDURE read ( l : INOUT line; value : OUT string );
  PROCEDURE read ( l : INOUT line; value : OUT time; good : OUT boolean );
  PROCEDURE read ( l : INOUT line; value : OUT time );  
 
  -- output routines for standard types :
  PROCEDURE writeline ( f : OUT text; l : IN line );
  PROCEDURE write ( l : INOUT line; value : IN bit;
                    justified : IN side := right;  field : IN width := 0 );
  PROCEDURE write ( l : INOUT line; value : IN bit_vector;
                    justified : IN side := right;  field : IN width := 0 );
  PROCEDURE write ( l : INOUT line; value : IN boolean;
                    justified : IN side := right;  field : IN width := 0 );
  PROCEDURE write ( l : INOUT line; value : IN character;
                    justified : IN side := right;  field : IN width := 0 );
  PROCEDURE write ( l : INOUT line; value : IN integer;
                    justified : IN side := right;  field : IN width := 0 );
  PROCEDURE write ( l : INOUT line; value : IN real;
                    justified : IN side := right;  field : IN width := 0;
                    digits : IN natural := 0 );
  PROCEDURE write ( l : INOUT line; value : IN string;
                    justified : IN side := right;  field : IN width := 0 );
  PROCEDURE write ( l : INOUT line; value : IN time;
                    justified : IN side := right;  field : IN width := 0;
                    unit : IN time := ns );
 
  -- file position predicates :
  -- FUNCTION endline ( l : IN line ) RETURN boolean; -- only VHDL'87
  FUNCTION endfile ( f : IN text ) RETURN boolean;
 
END TEXTIO;