with Text_Io;
package File_Name_Package is

    --==============================================================
    -- This package provides the user with the necessary           =
    -- operations to support an abstract data type for a file      =
    -- name. These operations include associating an input file    =
    -- name with the logical file name, returning a string         =
    -- representation of a file name for use in Text_IO opeations, =
    -- getting an input file name from the user, getting an output =
    -- file name from the user, and determining whether a file     =
    -- name was typed in by the user.                              =
    --                                                             =
    -- written  by  GER  with  help  from  b**2  and  JM           =
    --==============================================================

    type File_Name is private;

    No_More_File_Names : exception;
    -- This exception is raised when there are no more file names to
    -- be read

    procedure Associate_Input_File_Names
                 (This_File : in File_Name;
                  With_Input_File : in out Text_Io.File_Type);
    -- Associates the physical file name with the logical file
    -- for input files

    function A_String_Output_File (This_File : in File_Name) return String;
    -- Returns the string representation of a file name

    procedure Get_Output_File_Name (For_This_File : out File_Name);
    -- Prompts the user for an output file name
    -- Reads the user's response

    procedure Get_Input_File_Name (For_This_File : out File_Name);
    -- Prompts the user for an input file name
    -- Reads the user's response

    function File_Name_Is_Given (For_This_File : in File_Name) return Boolean;
    -- Returns true if anything besides a carriage return was
    -- typed in, false otherwise
private
    Max_Characters_In_File_Name : constant := 132;
    subtype Name_Index_Type is Positive range 1 .. Max_Characters_In_File_Name;
    type Name_Type is new String (Name_Index_Type);

    type File_Name is
        record
            Number_Of_Characters : Natural := 0;
            Characters_In_Name : Name_Type := Name_Type'(others => ' ');
        end record;
end File_Name_Package;