comp.lang.ada
 help / color / mirror / Atom feed
From: "Mike Silva" <mjsilva@jps.net>
Subject: Wrap-Up (was Re: Unchecked_Conversion on different sized types -- problem?)
Date: 2000/01/14
Date: 2000-01-14T00:00:00+00:00	[thread overview]
Message-ID: <qaIf4.469$dw3.16808@news.wenet.net> (raw)
In-Reply-To: qXpf4.429$dw3.15200@news.wenet.net

Well, here's what I learned:

1) I can explicitly set the size of enumeration elements to Integer'Size,
avoiding the problem of converting between different-sized objects.

2) I can't even type in the simplest sample code without making a mistake (I
wasn't really using Text_IO.Put to send an Integer...)

3) I didn't think my problem all the way through -- since what I wanted in
the end was an enumeration-to-string mapping, there was no need to deal with
intermediate integers.

4) Enumerations with representation clauses seem to be a little like piggy
banks -- easy to fill, but harder to extract from.

So, my solution is to map an enumeration to an array of strings.  Thanks to
all for your comments.

Mike







  parent reply	other threads:[~2000-01-14  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
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 ` Werner Pachler
2000-01-14  0:00   ` Bryce Bardin
2000-01-14  0:00   ` reason67
2000-01-14  0:00 ` Mike Silva [this message]
2000-01-15  0:00   ` Wrap-Up (was Re: Unchecked_Conversion on different sized types -- problem?) Matthew Heaney
2000-01-15  0:00     ` Robert A Duff
2000-01-14  0:00 ` Unchecked_Conversion on different sized types -- problem? 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