comp.lang.ada
 help / color / mirror / Atom feed
From: sarge!sarge!svh@uunet.uu.net  (Steven Hovater)
Subject: Re: SunAda question
Date: 22 Jul 93 10:49:42 GMT	[thread overview]
Message-ID: <svh.743338182@sarge> (raw)

Egad... who would have thought....

>procedure gethost is 
>        namelen : integer := 20;
>        hostname : string (1..namelen);
>        stat : unix.status_code;
>begin
>        stat := unix.gethostname(hostname'address,namelen);
>        text_io.put_line ("Hostname is " & hostname);
>end gethost;

as an illustration to show that the function indeed modified the in parameter
would turn into such a fracas.

Thanks Dave and Karl for pointing out that I should really have been a little 
more careful - yes, I should have. There _are_ much better ways of coding the
above. 

I retract the comment I made about portability in my post. 

Steve
-- 
Steven V. Hovater                      (703)318-5839
Senior CASE Engineer                   
Verdix Corporation                     EMAIL: svh@verdix.com

             reply	other threads:[~1993-07-22 10:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-07-22 10:49 Steven Hovater [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-07-21 20:52 SunAda question Esther Lumsdon
1993-07-21 18:50 David Emery
1993-07-21 16:07 cis.ohio-state.edu!magnus.acs.ohio-state.edu!math.ohio-state.edu!darwin.s
1993-07-21 15:39 Robert I. Eachus
1993-07-21 13:25 cis.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!news.cac.ps
1993-07-21 12:07 Chris Elliott
1993-07-21 11:37 Steven Hovater
1993-07-20 20:38 Kenneth Anderson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox