comp.lang.ada
 help / color / mirror / Atom feed
From: Jim Rogers <ada_daddy@my-deja.com>
Subject: Re: Unchecked_Conversion on different sized types -- problem?
Date: 2000/01/13
Date: 2000-01-13T00:00:00+00:00	[thread overview]
Message-ID: <85lht1$l8c$1@nnrp1.deja.com> (raw)
In-Reply-To: qXpf4.429$dw3.15200@news.wenet.net

In article <qXpf4.429$dw3.15200@news.wenet.net>,
  "Mike Silva" <mjsilva@jps.net> wrote:
> To do some prototyping I'm extending Michael Feldman's ANSI screen
package a
> bit, to allow colors, etc, and I ran into a question.  I've enumerated
> various attributes and set the enumerations to the corresponding ANSI
codes,
> and I'm using UC to convert the enumerated types to an Integer, to
send via
> Text_IO.Put().  I get a warning (GNAT 3.12p) that the types for the
UC have
> different sizes (not surprising), and I'm wondering if UC always does
the
> "right" thing here, i.e. zero-extending the smaller enum type when
> converting to an Integer.

 The simple solution to this is to declare a set of integer constants,
not enumerated types. The constants will require no conversions at
all.

Jim Rogers
Colorado Springs, Colorado


Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~2000-01-13  0:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-13  0:00 Unchecked_Conversion on different sized types -- problem? Mike Silva
2000-01-13  0:00 ` Jim Rogers [this message]
2000-01-13  0:00   ` Mike Silva
2000-01-13  0:00     ` James S. Rogers
2000-01-13  0:00 ` Bryce Bardin
2000-01-13  0:00   ` Mike Silva
2000-01-13  0:00     ` Mike Silva
2000-01-14  0:00       ` Bryce Bardin
2000-01-14  0:00         ` Mike Silva
2000-01-14  0:00   ` Matthew Heaney
2000-01-13  0:00 ` reason67
2000-01-14  0:00 ` Keith Thompson
2000-01-16  0:00   ` David A. Cobb
2000-01-14  0:00 ` Jeff Carter
2000-01-14  0:00 ` Wrap-Up (was Re: Unchecked_Conversion on different sized types -- problem?) Mike Silva
2000-01-15  0:00   ` Matthew Heaney
2000-01-15  0:00     ` Robert A Duff
2000-01-14  0:00 ` Unchecked_Conversion on different sized types -- problem? Werner Pachler
2000-01-14  0:00   ` Bryce Bardin
2000-01-14  0:00   ` reason67
2000-01-14  0:00 ` Vladimir Olensky
replies disabled

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