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,71c41b6f4d72158c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-13 11:05:31 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!newsfeed2.earthlink.net!newsfeed1.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3D306BD8.CF49BB0D@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: if X in 1..35000 versus Boolean References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sat, 13 Jul 2002 18:05:33 GMT NNTP-Posting-Host: 63.184.9.143 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 1026583533 63.184.9.143 (Sat, 13 Jul 2002 11:05:33 PDT) NNTP-Posting-Date: Sat, 13 Jul 2002 11:05:33 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:27057 Date: 2002-07-13T18:05:33+00:00 List-Id: Jan Prazak wrote: > > But the word "in" tests, if given object (variable...) is > in given enumeration type. No, it doesn't. "in" checks for subtype membership. It is defined for ALL types. X in 1 .. 35_000 checks for membership of the value of X in an anonymous subtype. But you can also write things like type C is (Red, Yellow, Blue); type R (D : C) is record ... subtype RC is R (D => Yellow); function F return C is ... V : R (D => F); if V in RC ... -- Jeff Carter "Monsieur Arthur King, who has the brain of a duck, you know." Monty Python & the Holy Grail