From: Ken Garlington <garlingtonke@lmtas.lmco.com>
Subject: Re: Ada 83: Type defaults
Date: 1996/09/12
Date: 1996-09-12T00:00:00+00:00 [thread overview]
Message-ID: <32381A53.3FF8@lmtas.lmco.com> (raw)
In-Reply-To: 516mkh$d3m@ryker.dma.gov
hehmeyerj wrote:
>
> This may be a simple problem but...
>
> I have an enumeration type declaration. For example:
>
> type x is (A, B, C, D);
>
> And I have about three hundred variables of type x scattered throughout
> 50 packages. How would you default the type to, say A, without going
> to each individual variable declaration and explicitly defaulting them.
> (ie y : x := A;)
>
> TIA
There's the "wrap a record around it" solution (see other posts).
There's the "Make X an abstract data type" solution, which doesn't
really make the typing easier, but it can be used to _ensure_ that every
variable of type X is given the same default value.
Also, there's the solution that begins:
1. Upgrade to Ada 95... :)
--
LMTAS - "Our Brand Means Quality"
prev parent reply other threads:[~1996-09-12 0:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-09-11 0:00 Ada 83: Type defaults hehmeyerj
1996-09-11 0:00 ` Thomas Kendelbacher
1996-09-11 0:00 ` John G. Volan
1996-09-12 0:00 ` Ken Garlington [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox