From mboxrd@z Thu Jan 1 00:00:00 1970 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro Newsgroups: comp.lang.ada Subject: Re: Reduction expressions Date: Wed, 21 Aug 2024 01:37:22 -0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <874j7edanw.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 21 Aug 2024 03:37:23 +0200 (CEST) Injection-Info: dont-email.me; posting-host="b7054728ccecf746f3a261c5985019ab"; logging-data="3766729"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ZvFt7FE2C/TzbqiHmoqZe" User-Agent: Pan/0.159 (Vovchansk; ) Cancel-Lock: sha1:hQjYlaZ5n0KE1g8mVvHbd2vA3Bw= Xref: news.eternal-september.org comp.lang.ada:66310 List-Id: On Tue, 20 Aug 2024 16:41:55 -0700, Keith Thompson wrote: > A subtype with no added constraint is similar to a C typedef, but given > > subtype Digit is Integer range 0..9; > > Digit is distinct from Integer (though they're both the same type). “Integer range 0..9” is a subtype of Integer, and is valid for example as a return type where Integer is expected. The “subtype” declaration doesn’t actually create the subtype: “Digit” is just a shorthand name for that, just like a C typedef.