comp.lang.ada
 help / color / mirror / Atom feed
* Storage space question
@ 1998-12-10  0:00 Craig Allen
  1998-12-10  0:00 ` Marin David Condic
  1998-12-10  0:00 ` dennison
  0 siblings, 2 replies; 21+ messages in thread
From: Craig Allen @ 1998-12-10  0:00 UTC (permalink / raw)


Hello!

the short version of my question is this:  If I'm using enumerations 
to
define names that will represent specific bit patterns that my program
may
wish to use, do *all* these bit patterns allocate space? e.g.  with 
this:

   type DCD_Mode_Type is
      (CARRIER_DETECT, SYNC_DETECT, LOW, HIGH);
   for DCD_Mode_Type'Size use 2;
   for DCD_Mode_Type use
      (CARRIER_DETECT => 2#00#,
       SYNC_DETECT    => 2#01#,
       LOW            => 2#10#,
       HIGH           => 2#11#
       );

is space allocated for each of these definitions?  I ask because I 
added
many of these types to a package I'm writing, and my memory map seems 
to
have grown even without using these types yet.  
I'd like to have these names available for use, but taking no more 
space
than what is necessary (like #define in C...) (I would only be using 1
definition per application, no need for space declared for all 
definitions...)

I'm using Ada 83, but I don't think that matters.

Thanks.
-Craig






^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~1998-12-14  0:00 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-10  0:00 Storage space question Craig Allen
1998-12-10  0:00 ` Marin David Condic
1998-12-10  0:00   ` Matthew Heaney
1998-12-10  0:00     ` dennison
1998-12-10  0:00   ` Pat Rogers
1998-12-10  0:00     ` dennison
1998-12-10  0:00       ` Pat Rogers
1998-12-10  0:00   ` Tucker Taft
1998-12-10  0:00     ` callen
1998-12-10  0:00       ` dennison
1998-12-10  0:00       ` Marin David Condic
1998-12-10  0:00         ` Tucker Taft
1998-12-11  0:00           ` dennison
1998-12-11  0:00         ` Matthew Heaney
1998-12-11  0:00           ` Marin David Condic
1998-12-12  0:00             ` Matthew Heaney
1998-12-12  0:00               ` David C. Hoos, Sr.
1998-12-12  0:00                 ` Matthew Heaney
1998-12-14  0:00                 ` dennison
1998-12-11  0:00       ` Matthew Heaney
1998-12-10  0:00 ` dennison

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