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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a05:620a:132e:: with SMTP id p14mr17269109qkj.265.1572890174166; Mon, 04 Nov 2019 09:56:14 -0800 (PST) X-Received: by 2002:a05:6830:15ca:: with SMTP id j10mr6952489otr.276.1572890173872; Mon, 04 Nov 2019 09:56:13 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.dns-netz.com!news.freedyn.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!j16no10444802qtl.0!news-out.google.com!p4ni142qtu.1!nntp.google.com!j16no10444794qtl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 4 Nov 2019 09:56:13 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=146.5.2.231; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 146.5.2.231 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <21fa6db8-4b86-459f-bc5a-70993f92c28a@googlegroups.com> Subject: Re: How to best make a custom range? From: Shark8 Injection-Date: Mon, 04 Nov 2019 17:56:14 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2325 X-Received-Body-CRC: 769255941 Xref: reader01.eternal-september.org comp.lang.ada:57468 Date: 2019-11-04T09:56:13-08:00 List-Id: On Monday, November 4, 2019 at 10:26:22 AM UTC-7, Andrew Shvets wrote: > Lets say I have the following code: >=20 > subtype Test_Char is Character range =E2=80=98A=E2=80=99 .. =E2=80=98Z=E2= =80=99; >=20 > But what if I wanted to include =E2=80=98&=E2=80=99, =E2=80=98@=E2=80=98 = and =E2=80=98?=E2=80=99 in this custom range of characters as well? I thou= ght of doing the following, but this obviously failed: >=20 > subtype Test_Char is Character range =E2=80=98@=E2=80=98 | =E2=80=98&=E2= =80=99 | =E2=80=98?=E2=80=99 | =E2=80=98A=E2=80=99 .. =E2=80=98Z=E2=80=99; >=20 > Or is this impossible unless I use a different approach? The approach I've been going with is splitting things apart into parts: Subtype Upper is Character range 'A'..'Z'; Subtype Lower is Character range 'a'..'z'; Subtype Symbol is Character with Static_Predicate =3D> '&' | '@' | '?'; Subtype Test_Character is Character with Static_Predicate =3D> Upper | Lower | Symbol;