Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ada > Private type de...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 5577 of 5931
Post > Topic >>

Private type definition must be definite : but why ?

by "=?ISO-8859-1?Q?Hibou57_(Yannick_Duch=EAne)?=" <yannick_duchene@[EMAIL PROTECTED] Mar 1, 2008 at 04:23 PM

Hello, hello...

I'm trying to express something I can't express with Ada semantic :

> package Xxx
>   type Data_Row_Type is private;
>   ...
> private
>   type Data_Row_Type is new String;
>   ...
> end Xxx;

Bu I cannot do that, beceause a private type definition must be
definite.

While I can do

> package Xxx
>   type Data_Row_Type is new String;
>   ...
> end Xxx;

I would like to understand the reason of this restriction. There is a
user view (the public part) and a compiler view (public part + private
part). So what's the matter if I want the user not to rely on the fact
that Data_Row_Type is a new String type, but still want the compiler
to know it. Why is it not allowed ?

What does justify the obligation for a private type to be definite ?

I do not see any reason at the time.

Thanks and good times to you

Yannick
 




 4 Posts in Topic:
Private type definition must be definite : but why ?
"=?ISO-8859-1?Q?Hibo  2008-03-01 16:23:01 
Re: Private type definition must be definite : but why ?
"=?ISO-8859-1?Q?Hibo  2008-03-01 16:37:57 
Re: Private type definition must be definite : but why ?
Robert A Duff <bobduff  2008-03-01 19:43:06 
Re: Private type definition must be definite : but why ?
Adam Beneschan <adam@[  2008-03-03 08:29:16 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 14 11:26:46 CDT 2008.