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,30e0ceaf4e6be70c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-04 14:17:06 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi.com!sccrnsc03.POSTED!not-for-mail From: "Jeffrey Creem" Newsgroups: comp.lang.ada References: <1e3ht-ig4.ln1@beastie.ix.netcom.com> Subject: Re: Simple program to find average of 3 numbers X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: NNTP-Posting-Host: 66.31.5.146 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc03 1057353420 66.31.5.146 (Fri, 04 Jul 2003 21:17:00 GMT) NNTP-Posting-Date: Fri, 04 Jul 2003 21:17:00 GMT Organization: AT&T Broadband Date: Fri, 04 Jul 2003 21:17:00 GMT Xref: archiver1.google.com comp.lang.ada:40066 Date: 2003-07-04T21:17:00+00:00 List-Id: Remeber everyone. -gnato is your friend. GNAT by default does not run with integer overflow checks enabled. try again gnatmake -f -gnato avg Gets Constraint_Error on GNAT 3.15p under windows XP. "Dennis Lee Bieber" wrote in message news:1e3ht-ig4.ln1@beastie.ix.netcom.com... > prashna fed this fish to the penguins on Friday 04 July 2003 02:28 am: > > > > > O.K, I have changed line 12 to AVG := (OBJ1+OBJ2+OBJ3)/3; > > But still it giving constraint error!!! :(( > > What compiler, and what OS? > > > ---- avg.adb, using GNAT 3.15p, Mandrake Linux 8.2 > > procedure avg is > > type ONE_TO_100 is range 1..100; > > Obj1, Obj2, Obj3 : ONE_TO_100; > Avg : ONE_TO_100; > > begin > Obj1 := 70; > Obj2 := 70; > Obj3 := 70; > > Avg := (Obj1 + Obj2 + Obj3) / 3; > end avg; > > ---- > [wulfraed@beastie ada]$ gnatmake avg > gcc -c avg.adb > gnatbind -x avg.ali > gnatlink avg.ali > > [wulfraed@beastie ada]$ ./avg > > No error (no output either, but you didn't have any shown... > > -- > > ============================================================== < > > wlfraed@ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG < > > wulfraed@dm.net | Bestiaria Support Staff < > > ============================================================== < > > Bestiaria Home Page: http://www.beastie.dm.net/ < > > Home Page: http://www.dm.net/~wulfraed/ < >