comp.lang.ada
 help / color / mirror / Atom feed
From: news.crd.ge.com!e7sa!groleau@uunet.uu.net  (Wes Groleau X7574)
Subject: putting default value on a subtype of an undefaulted type.
Date: 26 May 93 15:19:23 GMT	[thread overview]
Message-ID: <C7n3wB.BGJ@crdnns.crd.ge.com> (raw)

Situation:
      type NO_DEFAULT ( Discrim : NATURAL ) is
         record
            A : SOME_TYPE;
            B : STRING ( 1 .. Discrim );
         end record;

Problem:
      1. The type declaration is not mine but I'm forced to use it.
      2. Can't declare objects of that type without constraining them
         to a fixed value of Discrim.

Question:
      What is the syntax for creating a subtype with the same set of values
      as the original type but which has a default discriminant?  

Curiosity:
      What is the syntax for giving A a default value in a subtype? 

             reply	other threads:[~1993-05-26 15:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-05-26 15:19 Wes Groleau X7574 [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-05-26 15:57 putting default value on a subtype of an undefaulted type Michael Feldman
1993-05-26 18:04 dog.ee.lbl.gov!overload.lbl.gov!agate!howland.reston.ans.net!noc.near.net
1993-05-26 19:29 Robert I. Eachus
replies disabled

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