AdaPower Logged in as Guest
Ada Tools and Resources

Ada 95 Reference Manual
Ada Source Code Treasury
Bindings and Packages
Ada FAQ


Join >
Articles >
Ada FAQ >
Getting Started >
Home >
Books & Tutorials >
Source Treasury >
Packages for Reuse >
Latest Additions >
Ada Projects >
Press Releases >
Ada Audio / Video >
Home Pages >
Links >
Contact >
About >
Login >
Back
GNAT.IO_Aux Example (David Botton)

-- GNAT.IO_Aux Example
--
-- GNAT.IO_Aux offers a Get_Line function that returns a string and
-- a function to check for an existing file.

with GNAT.IO; use GNAT.IO;
with GNAT.IO_Aux;

procedure Gio_Aux is
begin

   Put("Check if what file exists? : ");

   declare
      File_Name : String := GNAT.IO_Aux.Get_Line;
   begin
      if GNAT.IO_Aux.File_Exists(File_Name) then
         Put_Line("File exists");
      else
         Put_Line("File does not exist");
      end if;
   end;

end Gio_Aux;


(c) 1998-2004 All Rights Reserved David Botton