Deutsch   English   Français   Italiano  
<va3gci$3iue9$11@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Lawrence D'Oliveiro <ldo@nz.invalid>
Newsgroups: comp.lang.ada
Subject: Re: Reduction expressions
Date: Wed, 21 Aug 2024 01:37:22 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <va3gci$3iue9$11@dont-email.me>
References: <ly5xs4d2ft.fsf@pushface.org> <va149e$388rf$1@dont-email.me>
	<lyjzgaopm8.fsf@pushface.org> <va38ve$3i3ne$11@dont-email.me>
	<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=
Bytes: 1556

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.