From: "björn lundin" <b.f.lundin@gmail.com>
Subject: subtype definitions
Date: Wed, 26 Sep 2012 06:45:10 -0700 (PDT)
Date: 2012-09-26T06:45:10-07:00 [thread overview]
Message-ID: <dee2be1d-30fc-4a0a-bc6e-424419a530be@googlegroups.com> (raw)
Hi!
I got a type definition as
type Assignment_Type_Type is (Transport, Store, Retrieve, Rearrange, Check,
Set_Error, Restore, Mob_Trsp1, Mob_Trsp2,
Mob_Trsp3, Mob_Trsp4, Mob_Store, Mob_Check);
I want to loop through some of the values, in another order
for Asm_Type in Transport | Check | Restore | Set_Error | Store loop
Do_Something(Asm_Type);
end loop;
The above does not compile.
subtype Asm_Type_Type is Assignment_Type_Type range Transport | Check | Restore | Set_Error | Store ;
no go .
Is there a valid construction in Ada 05 (gnat) that I can use?
http://en.wikibooks.org/wiki/Ada_Programming/Subtypes
has a long discussion, but none with
elements in different order, only like Retrieve .. Check
--
Björn Lundin
next reply other threads:[~2012-09-26 13:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-26 13:45 björn lundin [this message]
2012-09-26 13:58 ` subtype definitions Niklas Holsti
2012-09-26 14:36 ` björn lundin
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox