Env. Environment Variables - JulTob/Ada GitHub Wiki

Environment variables can easily be set and read with Ada.Command_Line.Environment package. You can also set them directly through the standard C library.

function putenv( str : string ) return integer;
pragma import( C, putenv );

Define a Linux environment variable. putenv literally saves a pointer to the string; therefore the string must be global (or a literal). Example:

Result := putenv( "TERM=vt102" & ASCII.NUL );
function getenv( str : string ) return string;
pragma import( C, putenv );

Read the value of an environment value. Remember the string returned is a C string with an ending ASCII.NUL.