From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,11dba0f9ae4a6499,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Received: by 10.224.181.83 with SMTP id bx19mr608692qab.1.1348667111050; Wed, 26 Sep 2012 06:45:11 -0700 (PDT) Received: by 10.236.74.161 with SMTP id x21mr90361yhd.13.1348667111025; Wed, 26 Sep 2012 06:45:11 -0700 (PDT) Path: e10ni53868478qan.0!nntp.google.com!l8no11556324qao.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 26 Sep 2012 06:45:10 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=83.145.50.10; posting-account=3_reEwoAAAC163IAIrx427KYmwahFuh9 NNTP-Posting-Host: 83.145.50.10 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: subtype definitions From: =?ISO-8859-1?Q?bj=F6rn_lundin?= Injection-Date: Wed, 26 Sep 2012 13:45:11 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-09-26T06:45:10-07:00 List-Id: Hi! I got a type definition as type Assignment_Type_Type is (Transport, Store, Retrieve, Rearrange, Check,= =20 Set_Error, Restore, Mob_Trsp1, Mob_Trsp2,= =20 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 | Re= store | Set_Error | Store ;=20 no go .=20 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=20 elements in different order, only like Retrieve .. Check -- Bj=F6rn Lundin