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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ca9eef4d5e2078ea X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: Beware: Rep spec on an enumeration type causes code explosion Date: 1997/12/12 Message-ID: #1/1 X-Deja-AN: 297505162 References: <348F3DFC.10DB@nospam.flash.net> <3490252D.6B550F17@ac3i.dseg.ti.com> <3490B7B1.711A@nospam.flash.net> Organization: Estormza Software Newsgroups: comp.lang.ada Date: 1997-12-12T00:00:00+00:00 List-Id: In article <3490B7B1.711A@nospam.flash.net>, Ken.Garlington@nospam.computer.org wrote: >> Contiguous := Contiguous_Type (Holey); >> -- implicitly does equivalent of 'Pos >This assumes Holey will always be one of A, B, C, D, E. What happens >when the underlying >I/O device returns a value of 6 for Holey? Of course, you must always check for validity prior to the conversion, if Holey'Valid then Contiguous := Contiguous_Type (Holey); else end if; -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271