comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com
Subject: Re: Storage space question
Date: 1998/12/11
Date: 1998-12-11T00:00:00+00:00	[thread overview]
Message-ID: <74rcq9$n19$1@nnrp1.dejanews.com> (raw)
In-Reply-To: F3ruDu.Cr1.0.-s@inmet.camb.inmet.com

In article <F3ruDu.Cr1.0.-s@inmet.camb.inmet.com>,
  stt@houdini.camb.inmet.com (Tucker Taft) wrote:
> Marin David Condic (condicma@bogon.pwfl.com) wrote:
>
> : ...
> : If you can't find an answer in the compiler-specific documentation, you
> : can always get there through the
> : less-desirable-but-no-worse-than-C-does-it method of declaring a bunch
> : of named numbers:
>
> : Some_Name : constant := 2#0101# ;
>
> Actually, rather than using named numbers, I would recommend
> using named constants of a derived integer type devoted to this

Technicly, such constants are considered objects. Thus 'address is valid on
them, which means the compiler allocates runtime storage (which was his
problem with enumerations). In practice, the embedded compilers I have used
would treat such constants the same as named numbers, as long as you are
willing to declare them in a certian way, and not try a 'address on them. But
if he doesn't want *any* allocations for these things, it would be best to
check the compiler docs before using anthing other than named-numbers.

BTW: In order to get around the "namespace problems", you could declare each
register in its own package spec (and not use "use" clauses on them, of
course).

--
T.E.D.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




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

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