comp.lang.ada
 help / color / mirror / Atom feed
From: cpallen@nospam.com (Craig Allen)
Subject: Storage space question
Date: 1998/12/10
Date: 1998-12-10T00:00:00+00:00	[thread overview]
Message-ID: <9v6hGdgMLuwN-pn2-v5sq1RxFJ1z1@dt182n2f.tampabay.rr.com> (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






             reply	other threads:[~1998-12-10  0:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-10  0:00 Craig Allen [this message]
1998-12-10  0:00 ` Storage space question 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       ` 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-10  0:00       ` dennison
1998-12-11  0:00       ` Matthew Heaney
1998-12-10  0:00 ` dennison
replies disabled

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