with Ada.Text_IO;
with Ada.Environment_Variables;
 
procedure Env is
   package IO renames Ada.Text_IO;
   package EV renames Ada.Environment_Variables;
begin
   IO.Put_Line (Item => "Environment_Variables test");
   if EV.Exists (Name => "PATH") then
      IO.Put_Line (Item => "EXISTS!");
   else
      IO.Put_Line (Item => "DOES NOT EXIST!");
   end if;
 
   if EV.Exists (Name => "NONEXISTENT") then
      IO.Put_Line (Item => "EXISTS!");
   else
      IO.Put_Line (Item => "DOES NOT EXIST!");
   end if;
end Env;

Go back


Navigation