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,4c459ff0adb576bc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-19 11:40:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.cwix.com!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: Refactoring and Ada Date: 19 Feb 2002 13:39:59 -0600 Organization: LJK Software Message-ID: References: <3C5AB0B7.9D75D49A@grammatech.com> <3c639940@pull.gecm.com> <4519e058.0202080714.1bf916bb@posting.google.com> <3C65BFF4.F15A07D0@earthlink.net> NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1014147601 30514 192.135.80.34 (19 Feb 2002 19:40:01 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Tue, 19 Feb 2002 19:40:01 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:20132 Date: 2002-02-19T13:39:59-06:00 List-Id: In article , "Matthew Heaney" writes: > > "Larry Kilgallen" wrote in message > news:DRxVLK5K93Eq@eisner.encompasserve.org... >> In article , "Matthew Heaney" > writes: >> > I don't recommend you use representation clauses for enumeration types. > You >> > should forget this language feature even exists. Just use integer > constants >> > explicitly. >> >> Why ? >> >> The inability to store an arbitrary numeric value into a location >> whose type is enumerated is one of Ada's greatest strengths. > Here's another reason: > > E : aliased ET; > for E'Size use 8; > > read (fd, E'Address, 1); > > case E is ...; > > What happens when you read junk off the interface? Doesn't 'Valid detect that ?