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,dc82506adceed418 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-03-14 18:04:39 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!207.217.77.102!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3E728A25.8020701@acm.org> From: Jeffrey Carter User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Test for > 'last References: <1b585154.0303140406.124c3312@posting.google.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 15 Mar 2003 02:02:56 GMT NNTP-Posting-Host: 63.184.105.43 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1047693776 63.184.105.43 (Fri, 14 Mar 2003 18:02:56 PST) NNTP-Posting-Date: Fri, 14 Mar 2003 18:02:56 PST Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:35356 Date: 2003-03-15T02:02:56+00:00 List-Id: Peter Richtmyer wrote: > > --------------------------------------- > if enum_input < enum_type'first or > enum_input > enum_type'last then > -- handle the input error > --------------------------------------- Without knowing the type of Enum_Input, it's impossible to tell. This is simply an awkward way to say if Enum_Input not in Enum_Type then So it appears the coder did not have a lot of Ada experience and probably didn't understand what he was doing. If Enum_Input is of type Enum_Type, then the compiler probably optimized the condition to False and reduced the statement to the else part; if there's no else part, then it would optimize the entire if away. -- Jeff Carter "That was the most fun I've ever had without laughing." Annie Hall