From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,13b19740d69cbdc2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-16 10:00:41 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out1.nntp.be!propagator2-sterling!news-in-sterling.nuthinbutnews.com!snoopy.risq.qc.ca!news.uunet.ca!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Modes (was unbounded_string) References: <20031010074015.761204C40C1@lovelace.ada-france.org> <94skovca8efqisiip65q37of63g28n1284@4ax.com> <1h3jb.779716$uu5.136348@sccrnsc04> In-Reply-To: <1h3jb.779716$uu5.136348@sccrnsc04> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Thu, 16 Oct 2003 12:45:56 -0400 NNTP-Posting-Host: 198.96.223.163 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1066322731 198.96.223.163 (Thu, 16 Oct 2003 12:45:31 EDT) NNTP-Posting-Date: Thu, 16 Oct 2003 12:45:31 EDT Organization: Bell Sympatico Xref: archiver1.google.com comp.lang.ada:997 Date: 2003-10-16T12:45:56-04:00 List-Id: Jeff C, wrote: > "Warren W. Gay VE3WWG" 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