comp.lang.ada
 help / color / mirror / Atom feed
From: cis.ohio-state.edu!news.sei.cmu.edu!jbg@uunet.uu.net  (John Goodenough)
Subject: Re: Enumerations
Date: 19 Sep 92 00:40:35 GMT	[thread overview]
Message-ID: <1992Sep19.004035.22312@sei.cmu.edu> (raw)

The one case in which you might expect a compiler to provide a default
enumeration representation different from that of the position number is for
the predefined type BOOLEAN.  My understanding is that on some architectures
it can be more efficient to code FALSE as a negative number (e.g., all ones)
and TRUE as a non-negative number (e.g., all zeroes).  As I recall, it was at
least partly for this reason that the LRM did not specify the default
representation for enumeration types.  

Robert Dewar is fond of pointing out (as a way of highlighting the common
confusion between an abstract value and its representation) that it should not
be considered peculiar that the LRM fails to specify a default representation
for enumeration values; it doesn't specify the default representation of
integers either!  

John B. Goodenough					Goodenough@sei.cmu.edu
Software Engineering Institute				412-268-6391

             reply	other threads:[~1992-09-19  0:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-09-19  0:40 John Goodenough [this message]
  -- strict thread matches above, loose matches on Subject: below --
1992-09-22 14:27 Enumerations Chris Elliott
1992-09-20 22:32 Enumerations Gary Morris @pulsar
1992-09-19  2:31 Enumerations Michael Feldman
1992-09-19  1:18 Enumerations Mark A Biggar
1992-09-18 17:54 Enumerations Michael Feldman
1992-09-18 15:41 Enumerations Mark A Biggar
1992-09-18  1:39 Enumerations Michael Feldman
1992-09-17 23:40 Enumerations Kevin Simonson
1992-09-17 22:26 Enumerations Darren Davenport 283-4173
1992-09-17 21:20 Enumerations david.c.willett
replies disabled

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