comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: I need a little help - it's been a long time - with enumeration type  and for use representation
Date: Fri, 13 Nov 2009 20:13:27 +0100
Date: 2009-11-13T20:13:27+01:00	[thread overview]
Message-ID: <psedux1zazm0$.1eqnd82wubisd$.dlg@40tude.net> (raw)
In-Reply-To: hdk9hp$qmn$2@news.tornevall.net

On Fri, 13 Nov 2009 11:48:12 -0700, Jeffrey R. Carter wrote:

> Dmitry A. Kazakov wrote:
>> 
>> You parse "0x", then you do a hexadecimal number following it, then you
>> pass that number (x) to:
>> 
>>    Spell_School_Type'Val (x)
> 
> This doesn't work with a non-default representation. 'Val reverses 'Pos, and 
> 'Pos gives sequential values starting with zero, regardless of the representation.

But it works with the modular type proposed. An enumeration type was not
meant. For enumeration types one should parse names, rather than arbitrary
bit patterns.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2009-11-13 19:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-13 16:03 I need a little help - it's been a long time - with enumeration type and for use representation Harry Tucker
2009-11-13 17:24 ` Niklas Holsti
2009-11-13 17:24 ` Dmitry A. Kazakov
2009-11-13 18:48   ` Jeffrey R. Carter
2009-11-13 19:13     ` Dmitry A. Kazakov [this message]
2009-11-13 20:32       ` Jeffrey R. Carter
2009-11-13 20:53         ` Dmitry A. Kazakov
2009-11-13 21:30           ` Jeffrey R. Carter
2009-11-14  9:24             ` Dmitry A. Kazakov
2009-11-13 18:46 ` Jeffrey R. Carter
replies disabled

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