From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.9 required=3.0 tests=BAYES_00,NICE_REPLY_A autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R.Carter" Newsgroups: comp.lang.ada Subject: Re: Renaissance-Ada, a toolset for legacy Ada software, made open source Date: Fri, 28 Jan 2022 14:58:09 +0100 Organization: A noiseless patient Spider Message-ID: References: <7a2f8e84-f7ab-4322-9a8d-9c5da6004d43n@googlegroups.com> <2a680ba5-deff-4473-840c-1db8e55d0957n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 28 Jan 2022 13:58:09 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="493fe275b6a6571492f1142c310e6213"; logging-data="6799"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18fCdO0GB9dWzEF2M5WRt3xQtepS+FWchA=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Cancel-Lock: sha1:63c2NXE7BBvOAfSv1awLNFM4/+g= In-Reply-To: Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:63414 List-Id: On 2022-01-28 13:31, Simon Wright wrote: > > I found myself using a case statement rather than an if so as to avoid a > 'use type': U is an Interfaces.Unsigned_16, > > case U is > when 1 => do one thing; > when others => do something else; > end case; These days you can use "in" if U in 1 then -- Jeff Carter "Write clearly--don't sacrifice clarity for 'efficiency.'" Elements of Programming Style 186