Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ada.environment_variables.exists_example_source [2012/01/14 20:47] (current)
thomaslocke created
Line 1: Line 1:
 +<code ada>
 +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;
 +</​code>​
 +
 +[[Ada.Environment_Variables#​Ada.Environment_Variables.Exists | Go back]]
  

Navigation