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:a24:36c9:: with SMTP id l192-v6mr8373832itl.43.1528047948519; Sun, 03 Jun 2018 10:45:48 -0700 (PDT) X-Received: by 2002:aca:1a18:: with SMTP id a24-v6mr258533oia.5.1528047948390; Sun, 03 Jun 2018 10:45:48 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!85.12.16.68.MISMATCH!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!v8-v6no4344155itc.0!news-out.google.com!f20-v6ni2950itd.0!nntp.google.com!v8-v6no4344152itc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 3 Jun 2018 10:45:48 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2400:416e:1ba5:1200:91e3:9198:6925:ea8c; posting-account=Mi71UQoAAACnFhXo1NVxPlurinchtkIj NNTP-Posting-Host: 2400:416e:1ba5:1200:91e3:9198:6925:ea8c User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <4ece357c-025c-45ff-9f5d-89c89d47e6c0@googlegroups.com> Subject: Some kind of repeating in Static_Predicate From: ytomino Injection-Date: Sun, 03 Jun 2018 17:45:48 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 1933 X-Received-Body-CRC: 3379164800 Xref: reader02.eternal-september.org comp.lang.ada:52883 Date: 2018-06-03T10:45:48-07:00 List-Id: Hello. I'm trying to use a constant table (but that is unstable and may be changed in compile-time) in Static_Predicate. Set : constant String := ('T', 'a', 'b', 'l', 'e'); subtype T is Character with Static_predicate => (for some I of Set => X = I); Of cause, quantified expression in the static context is illegal. xx.ads:6:33: expression is not predicate-static (RM 3.2.4(16-22)) So, it have to be rewrote to subtype T is Character with Static_Predicate => (T = Set (1) or else (Set'Last >= 2 and then T = Set (2)) or else (Set'Last >= 3 and then T = Set (3)) or else (Set'Last >= 4 and then T = Set (4)) ...); This looks stupid. Is there any good alternative? Thank you.