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,c283845a79ad871d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-02 09:42:18 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: Ronald.Rosenfeld@rc.patrick.af.mil (Ronald Rosenfeld) Newsgroups: comp.lang.ada Subject: Re: ADA Compile Warning Date: 2 Nov 2001 09:42:18 -0800 Organization: http://groups.google.com/ Message-ID: <4ccfed40.0111020942.2e12011c@posting.google.com> References: <4ccfed40.0111010649.3f98d88@posting.google.com> <4efE7.8816$xS6.11821@www.newsranger.com> NNTP-Posting-Host: 198.26.123.36 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1004722938 8448 127.0.0.1 (2 Nov 2001 17:42:18 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 2 Nov 2001 17:42:18 GMT Xref: archiver1.google.com comp.lang.ada:15677 Date: 2001-11-02T17:42:18+00:00 List-Id: Ted Dennison wrote in message news:<4efE7.8816$xS6.11821@www.newsranger.com>... > In article <4ccfed40.0111010649.3f98d88@posting.google.com>, Ronald Rosenfeld > says... > > Perhaps someone can help. We use a Rational VADSself Version > >6.2.1. ADA compiler for DEC RISC Ultrix machines. When compiling the > >following piece of code: > > > >"WITH text_io; -- WITHs must precede each new package declaration > > WITH base; > > PACKAGE byte_io IS NEW text_io.integer_io (base.byte_type);", > > > >we get the following warning: > > > >"warning: Appendix F: representation of actual prevents code sharing". > > > >Why is the warning pointing to "NEW text_io.integer_io > >(base.byte_type);"? > > This is essentially saying: "Normally, I would share some code between this > generic instantiation of Text_IO.Integer_IO and all other such instantiations to > save space. However, I'm unable to do that in this case because of the way > base.byte_type is defined. Thus I'm going to have to create a separate copy of > all the code inside the generic." > > This isn't a really big problem, unless you are making lots of Integer_IO > instantiations. Most Ada compilers don't even implement this generic sharing at > all, so the fact that this one can't do it in this case is really of little > concern. > > However, since you appear to be a newbie (based on your capitilzation of "Ada"), > I'd like to ask *why* you are using Integer_IO in the first place. If you just > need a string representation of your integer-derived type, > "Base.Base_Type'image" would do the job much easier. Integer_IO is really only > for situations where you want to display the value in a specific format, or in a > base other than 10. > > --- > T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html > > No trees were killed in the sending of this message. > However a large number of electrons were terribly inconvenienced. Ted, Many thanks for your help. You asked me why I am using Integer_IO. That's a good question. I don't know. I just inherited the software. It does things in ways I don't understand. I tried your suggestion with success. Ron