From: AdaMagica <christ-usch.grein@t-online.de>
Subject: Re: Predicate and value attribute
Date: Sun, 24 Jan 2016 03:38:37 -0800 (PST)
Date: 2016-01-24T03:38:37-08:00 [thread overview]
Message-ID: <1e8fb50e-2f28-4052-b6fd-9b2760abc127@googlegroups.com> (raw)
In-Reply-To: <56a360fa$0$3294$426a74cc@news.free.fr>
Am Samstag, 23. Januar 2016 12:16:12 UTC+1 schrieb Xavier Petit:
> Hello, I have some beginner questions.
>
> subtype Number is String
> with Dynamic_Predicate => Positive'Value (Number) in -1 | 5;
>
> This line compiles and works. I would like some confirmation that 'Value
> attribute returns in this case the type Integer and doesn't take into
> account Positive subtype, and is why the following is valid:
>
> Test : Number := "-1";
>
> So I should never write "Positive'Value" right ?
It's the *type's* attribute, the subtype name is irreleveant (Integer, Natural, Positive all are subtypes of the same anonymous type).
next prev parent reply other threads:[~2016-01-24 11:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-23 11:16 Predicate and value attribute Xavier Petit
2016-01-24 11:38 ` AdaMagica [this message]
2016-01-25 8:28 ` Jacob Sparre Andersen
2016-01-25 14:52 ` Xavier Petit
2016-01-26 0:28 ` Anh Vo
2016-01-26 11:09 ` Xavier Petit
2016-01-26 18:06 ` Jeffrey R. Carter
2016-01-26 20:41 ` Anh Vo
2016-01-26 20:43 ` Simon Wright
2016-01-27 22:02 ` Xavier Petit
2016-01-28 7:56 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox