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-Thread: 103376,1e11857ea4f39dd6 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s21.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Trig Function Linking Problems References: <1176755562.190964.167640@w1g2000hsg.googlegroups.com> In-Reply-To: <1176755562.190964.167640@w1g2000hsg.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s21 1176769364 12.201.97.213 (Tue, 17 Apr 2007 00:22:44 GMT) NNTP-Posting-Date: Tue, 17 Apr 2007 00:22:44 GMT Organization: AT&T ASP.att.net Date: Tue, 17 Apr 2007 00:22:44 GMT Xref: g2news1.google.com comp.lang.ada:15067 Date: 2007-04-17T00:22:44+00:00 List-Id: AJAskey wrote: > > with ada.text_io; > use ada.text_io; > with ada.numerics.elementary_functions; > procedure TRIG is > a,b,c,d : float; > begin > a := 3.1415/4.0; > b := ada.numerics.elementary_functions.sin(x=>a); > c := ada.numerics.elementary_functions.cos(x=>a); > d := ada.numerics.elementary_functions.tan(x=>a); > put_line("sin(a)" & float'image(b)); > put_line("cos(a)" & float'image(c)); > put_line("tan(a)" & float'image(d)); > put_line("a " & float'image(a)); > end TRIG; >>>From new system with : GNATMAKE 3.2.3-13 (20030502) Copyright > 1995-2000 Free Software Foundation, Inc. > gcc 3.2.3 > Linux Red Hat 3.2.3-53 > >>> gnatmake trig > gcc -c trig.adb > gnatbind -x trig.ali > gnatlink trig.ali > >>> trig > > raised CONSTRAINT_ERROR : s-imgrea.adb:236 s-imgrea.adb is package System.Img_Real, used to implement Float'Image. Maybe it's a compiler error, or maybe there's something wrong with the values you're getting. What happens if you use Ada.Text_IO.Float_IO? You should also be able to find a newer version of the compiler and try it. -- Jeff Carter "My legs are gray, my ears are gnarled, my eyes are old and bent." Monty Python's Life of Brian 81