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-03 22:33:49 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Cephus�" Newsgroups: comp.lang.ada Subject: Re: Simple program to find average of 3 numbers Date: Fri, 4 Jul 2003 00:34:22 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: 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 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:40042 Date: 2003-07-04T00:34:22-05:00 List-Id: John R. Strohm wrote: > "prashna" wrote in message > news:d40d7104.0307032101.94d27f2@posting.google.com... >> Hi friends, >> >> What is wrong in the following program which is giving constraint >> error? >> >> procedure average is >> SUBtype ONE_TO_100 is range 1 .. 100; >> >> OBJ1, >> OBJ2, >> OBJ3, >> AVG : ONE_TO_100; >> begin >> OBJ1 := 70; >> OBJ2 := 70; >> OBJ3 := 70; >> AVG := (OBJ1+OBJ2+OBJ3)/3; > > -- This line doesn't do what you think it does. > -- Ask your TA to explain operator precedence to you in detail. > >> end average; >> >> >> Thanks in advance This is what it should be... Beau