comp.lang.ada
 help / color / mirror / Atom feed
From: Preben Randhol <randhol+valid_for_reply_from_news@pvv.org>
Subject: Re: Variant records..
Date: Mon, 16 Feb 2004 16:16:44 +0000 (UTC)
Date: 2004-02-16T16:16:44+00:00	[thread overview]
Message-ID: <slrnc31r7c.r6.randhol+valid_for_reply_from_news@k-083152.nt.ntnu.no> (raw)
In-Reply-To: e8f9995c.0402160725.45b85ca8@posting.google.com

On 2004-02-16, Ganesh Ramasivan <ganesh.ramasivan@gdcanada.com> wrote:
> Preben Randhol <randhol+valid_for_reply_from_news@pvv.org> wrote in message news:<slrnc318ga.3ja.randhol+valid_for_reply_from_news@k-083152.nt.ntnu.no>...
>> On 2004-02-15, Ganesh Ramasivan <ganesh.ramasivan@gdcanada.com> wrote:
>> > In the following example, how would i forbid the user of data type Foo
>> > from specifying the following:
>> >
>> > John : Foo(Vehicle => MAN, Power => AUTOMATIC);
>> >
>> > ie. is there a way to restrict the user from specifying certain types
>> > as variants?
>> 
>> I guess this is homework? If it is why don't you simply try to do this
>> and see what happens?
>
> This is just a simple example I am working with as I am an ada newbie.
>
> I tried and it compiles. What I am trying to do is to prevent the user
> from creating types that do not make sense.

If you put

   Audio : Foo(Vehicle => MAN, Power => AUTOMATIC);

it won't compile, so I do not really understand your question.

-- 
"Saving keystrokes is the job of the text editor, not the programming
 language."



  parent reply	other threads:[~2004-02-16 16:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-15 22:51 Variant records Ganesh Ramasivan
2004-02-16 10:57 ` Preben Randhol
2004-02-16 15:25   ` Ganesh Ramasivan
2004-02-16 15:46     ` Ludovic Brenta
2004-02-16 16:16     ` Preben Randhol [this message]
2004-02-17 14:37       ` Ganesh Ramasivan
2004-02-17 15:43         ` Preben Randhol
2004-02-16 16:59   ` Ganesh Ramasivan
2004-02-16 20:14     ` Simon Wright
2004-02-17 14:56       ` Ganesh Ramasivan
2004-02-17 15:31         ` Robert I. Eachus
2004-02-16 23:17 ` tmoran
  -- strict thread matches above, loose matches on Subject: below --
1999-09-14  0:00 Variant Records Shawn Barber
1999-09-14  0:00 ` Matthew Heaney
1999-09-14  0:00 ` David C. Hoos, Sr.
1999-09-14  0:00 ` Mark Lundquist
1986-10-31  9:08 variant records Dean Luick
1986-11-03 14:17 ` Bev Sobelman
1986-11-05 16:35 ` stuart
1986-11-06 15:40 ` stt
replies disabled

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