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: 103376,a20ed8b5fc3cad81,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!l39g2000cwd.googlegroups.com!not-for-mail From: "=?iso-8859-1?B?Suly6W1pZSBMdW1icm9zbw==?=" Newsgroups: comp.lang.ada Subject: Extended 'Succ attribute? Date: 22 Nov 2006 16:55:09 -0800 Organization: http://groups.google.com Message-ID: <1164243308.957573.223990@l39g2000cwd.googlegroups.com> NNTP-Posting-Host: 87.231.174.160 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1164243314 5705 127.0.0.1 (23 Nov 2006 00:55:14 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 23 Nov 2006 00:55:14 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1) Gecko/20061010 Firefox/2.0,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: l39g2000cwd.googlegroups.com; posting-host=87.231.174.160; posting-account=n3AXFg0AAACwBtDgpypzoCYGvIOQRJFn Xref: g2news2.google.com comp.lang.ada:7653 Date: 2006-11-22T16:55:09-08:00 List-Id: Hello, I just started Ada and was wondering if there is a way to make the Succ attribute of discrete types behave in a cyclic manner (akin to the modular type): type T_DAY is (Mon, Tue, Wed, Thu, Fri, Sat, Sun); ... day :=3D T_DAY'(Sun); day :=3D T_DAY'Succ(day); -- that this returns 'Mon' instead of -- a type constraint error I could of course define my own function to do this, but I wish to know if there is a way to get Ada to do it itself. Regards, J=E9r=E9mie