Hostname: Difference between revisions
Content added Content deleted
Line 4: | Line 4: | ||
=={{header|Ada}}== |
=={{header|Ada}}== |
||
with GNAT |
Works with GCC/GNAT |
||
Depending on need. |
|||
with Ada.Text_IO; |
|||
<pre> |
<pre> |
||
⚫ | |||
procedure Hostname is |
|||
begin |
|||
Name : Unbounded_String; |
|||
⚫ | |||
Name := TO_Unbounded(GNAT.Sockets.Host_Name); |
|||
end Hostname |
|||
Name : Access String; |
|||
Name := new String'(GNAT.Sockets.Host_Name); |
|||
</pre> |
</pre> |
||