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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.109.59.89.173.mobile.3.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Some kind of repeating in Static_Predicate Date: Mon, 04 Jun 2018 08:26:54 +0200 Organization: JSA Research & Innovation Message-ID: <87efhnoymp.fsf@jacob-sparre.dk> References: <4ece357c-025c-45ff-9f5d-89c89d47e6c0@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: franka.jacob-sparre.dk; posting-host="109.59.89.173.mobile.3.dk:109.59.89.173"; logging-data="31755"; mail-complaints-to="news@jacob-sparre.dk" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:rxNOvE0EJJkB0wg6lcGa5JbXjEk= Xref: reader02.eternal-september.org comp.lang.ada:52907 Date: 2018-06-04T08:26:54+02:00 List-Id: ytomino writes: > 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); Why not admit that it is a Dynamic_Predicate? Alternatively: type T is ('T', 'a', 'b', 'l', 'e'); Or: subtype T is Character with Static_Predicate => (T in 'T' | 'a' | 'b' | 'l' | 'e'); Greetings, Jacob -- "people who live in glass houses shouldn't be throwing rocks -- especially at those who don't live in glass houses"