From: "Warren W. Gay VE3WWG" <ve3wwg@cogeco.ca>
Subject: Re: Modes (was unbounded_string)
Date: Thu, 16 Oct 2003 12:45:56 -0400
Date: 2003-10-16T12:45:56-04:00 [thread overview]
Message-ID: <LWzjb.8670$cT6.420609@news20.bellglobal.com> (raw)
In-Reply-To: <1h3jb.779716$uu5.136348@sccrnsc04>
Jeff C, wrote:
> "Warren W. Gay VE3WWG" <ve3wwg_nospam@cogeco.ca> wrote in message
> news:Mb2jb.8531> Well, C returns a pointer, if you use getenv(2). However,
> there is no reason
>
>>that ACT could not have converted this into a normal Ada string, which is
>>what I would have expected. Even in C, you are really expected to use
>>putenv or setenv to make a change. However, programmers have been
>>known to "cheat" and modify the string that the getenv pointer points to,
>>which works provided that the string does not require more length. But
>>even in C terms, IMHO, this is a bad practice.
>
> Never assume that there is "no reason" for ACT or anyone else for that
> matter doing something without
> at least quickly looking at it. The start of the package says
Well, you assumed that I "assumed" there was "no reason". ;-) I
never assumed "that" -- I simply did not understand the "why"
for it, which you now have cleared up 8-)
> -- This package tends to use fairly low-level Ada in order to not bring
> -- in large portions of the RTL. For example, functions return access
> -- to string as part of avoiding functions returning unconstrained types.
>
> gnat.os_lib is useful but it probably should not be generally used within
> you code. It certainly would
> be nice if ACT provided a "thicker" version of the package (and perhaps if a
> few customers ask
> for it they will) but it appears that they had their reasons whey they
> originally set this up.
So now, we all know why B-)
--
Warren W. Gay VE3WWG
http://home.cogeco.ca/~ve3wwg
next prev parent reply other threads:[~2003-10-16 16:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20031010074015.761204C40C1@lovelace.ada-france.org>
2003-10-10 8:27 ` Modes (was unbounded_string) Andrew Carroll
2003-10-10 9:15 ` Dmitry A. Kazakov
2003-10-11 7:16 ` Simon Wright
2003-10-13 9:28 ` Dmitry A. Kazakov
2003-10-10 15:18 ` Stephen Leake
2003-10-10 16:21 ` Martin Dowie
2003-10-14 18:47 ` Craig Carey
2003-10-10 19:06 ` Jeffrey Carter
2003-10-13 9:33 ` Dmitry A. Kazakov
2003-10-13 9:40 ` Stephane Richard
2003-10-13 10:12 ` Dmitry A. Kazakov
2003-10-15 2:16 ` Warren W. Gay VE3WWG
2003-10-15 3:36 ` Jeff C,
2003-10-16 16:45 ` Warren W. Gay VE3WWG [this message]
[not found] <20031010094017.680474C40C1@lovelace.ada-france.org>
2003-10-10 10:58 ` Andrew Carroll
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox