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:29:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.airnews.net!cabal12.airnews.net!usenet From: "John R. Strohm" Newsgroups: comp.lang.ada Subject: Re: Simple program to find average of 3 numbers Date: Fri, 4 Jul 2003 00:22:27 -0500 Organization: Airnews.net! at Internet America Message-ID: References: Abuse-Reports-To: abuse at airmail.net to report improper postings NNTP-Proxy-Relay: library2.airnews.net NNTP-Posting-Time: Fri, 04 Jul 2003 00:27:12 -0500 (CDT) NNTP-Posting-Host: !bp421k-WOWN0r; (Encoded at Airnews!) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Xref: archiver1.google.com comp.lang.ada:40041 Date: 2003-07-04T00:22:27-05:00 List-Id: "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 > type 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