comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: Odd subtyping error.
Date: Fri, 5 Oct 2012 14:08:11 -0700 (PDT)
Date: 2012-10-05T14:08:11-07:00	[thread overview]
Message-ID: <03882820-1e7b-4ede-b22a-8098c247628b@googlegroups.com> (raw)
In-Reply-To: <ad8m81FtdrcU1@mid.individual.net>

On Friday, October 5, 2012 12:12:18 PM UTC-6, Niklas Holsti wrote:
> 
> The second error/warning line suggests to me that you have declared
> Pixel_Storage first as a "private" type, and that the full type
> declaration, including the "with Size" clause, appears only in the
> "private" part of the package declaration. Is that the case?

No; the representation {For Pixel_Storage Use ( ... )} is in the private portion.

The "with Size" aspect is to force the elements/values to use a certain size so that they will be compatible via conversion with the OpenGL functions taking GLEnum parameters -- I chose this typing method to eliminate the possibility of calling incorrect parameters, though perhaps it would have been better to use subtypes with Static_Predicate disallowing invalid values.



  parent reply	other threads:[~2012-10-05 21:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-05 16:05 Odd subtyping error Shark8
2012-10-05 18:12 ` Niklas Holsti
2012-10-05 18:44   ` Adam Beneschan
2012-10-05 21:08   ` Shark8 [this message]
2012-10-05 21:00 ` Shark8
2012-10-05 22:11   ` Adam Beneschan
2012-10-05 22:19     ` Shark8
2012-10-06  3:08       ` Adam Beneschan
2012-10-06  4:40         ` Shark8
2012-10-06 21:21       ` sbelmont700
2012-10-06 22:08         ` 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