comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: Subtype predicates
Date: Wed, 24 Aug 2016 17:08:22 -0700 (PDT)
Date: 2016-08-24T17:08:22-07:00	[thread overview]
Message-ID: <8955f6b0-18c6-41b9-91bf-b756189f53db@googlegroups.com> (raw)
In-Reply-To: <npl52j$4t8$1@dont-email.me>

> No, it's because of ARM 13.1.1(12/3): "If the associated declaration is a
> type_declaration, within the aspect_definition ... the name of the first subtype
> denotes the current instance of the type (see 8.6)." For a declaration:
> 
> V : Human_Life_Span_Type;
> 
> the current instance is V, so this says V's default value is V'First. Since you
> can't apply 'First to a scalar object, the aspect is in error.

Hm, another argument for a 'Type attribute, then we could say

type Human_Life_Span is range 0 .. 130
  with Default_Value => Human_Life_Span'Type'First; 


  reply	other threads:[~2016-08-25  0:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-23 20:14 Subtype predicates Anh Vo
2016-08-24 13:06 ` AdaMagica
2016-08-24 16:45   ` Shark8
2016-08-24 21:18     ` Anh Vo
2016-08-24 21:32       ` Shark8
2016-08-24 21:54   ` Jeffrey R. Carter
2016-08-25  0:08     ` Shark8 [this message]
2016-08-25  0:31       ` Jeffrey R. Carter
2016-08-25 17:28         ` Anh Vo
2016-08-31 18:16       ` Randy Brukardt
2016-09-01  8:09         ` J-P. Rosen
2016-09-01 20:02           ` Randy Brukardt
2016-09-01 20:16         ` Shark8
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox