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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,103b407e8b68350b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-16 22:15:37 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsmi-us.news.garr.it!NewsITBone-GARR!news.mailgate.org!fr.usenet-edu.net!usenet-edu.net!enst.fr!not-for-mail From: "Grein, Christoph" Newsgroups: comp.lang.ada Subject: Re: Anybody in US using ADA ? One silly idea.. Date: Fri, 17 Jan 2003 07:08:00 +0100 (MET) Organization: ENST, France Message-ID: Reply-To: "Grein, Christoph" , "comp.lang.ada mail<->news gateway" NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-Trace: avanie.enst.fr 1042784136 54943 137.194.161.2 (17 Jan 2003 06:15:36 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Fri, 17 Jan 2003 06:15:36 +0000 (UTC) To: comp.lang.ada@ada.eu.org Return-Path: X-Authentication-Warning: mail.eurocopter.com: uucp set sender to using -f Content-MD5: MWiM5lsZzeW3Bi/2w4uDmA== X-Mailer: dtmail 1.2.1 CDE Version 1.2.1 SunOS 5.6 sun4u sparc X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.1 Precedence: list List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:33115 Date: 2003-01-17T07:08:00+01:00 > "Grein, Christoph" writes: > > > > Which is easily solved by saying: > > > Lower : constant Integer := Read; > > > Upper : constant Integer := Read; > > > subtype S is Integer range Lower..Upper; > > > > > > (Fortunately, declarations *are* elaborated in order :-) > > > > which, by RM 3.3.1(7), is the same as > > > > Lower, Upper: constant Integer := Read; > > Which is an excellent example of why declaring multiple initialized > variables in one statement is a horrible thing to do. I'd have to > check the manual to see if Read is called once or twice for this; > please never do it! You have a point in posing that plea. But what would you do in this case: Limits: constant array (1..1000) of Integer := (others => Read); Do you also think Read is just called once? And in the above, if you want Read to be called exactly once, you'd have to write Lower: constant Integer := Read; Upper: constant Integer := Lower;