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!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Bob Duff Newsgroups: comp.lang.ada Subject: Re: Bounded String question Date: Wed, 11 Nov 2015 14:22:44 -0500 Organization: A noiseless patient Spider Message-ID: <8737wc733v.fsf@theworld.com> References: <7ba56b33-28d4-42d2-8b9b-5ad9f5beab8b@googlegroups.com> <87io597447.fsf@theworld.com> <87egfw7dnm.fsf@theworld.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="b95a1959649799dee38fd87fab0df4e4"; logging-data="10154"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+N7KaKig5fu1+cQLPuKBtD" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:mdNNyZCcLv9eOGzX7KJ0yjilmvs= sha1:KatLBF1G+By44ZZxUReGXjArDSQ= Xref: news.eternal-september.org comp.lang.ada:28306 Date: 2015-11-11T14:22:44-05:00 List-Id: "Jeffrey R. Carter" writes: > I missed the "limited" and concentrated on the default for the discriminant. Right, for limited types, the default for a discriminant is just a default, without the weird magical properties you get when its nonlimited. >...It > does mean that assignment becomes a bit messy, though. Yes, but I find that I hardly ever need assignment of these things. They are used to build up a Bounded_String piece by piece, and then do something with it (convert to String, convert to some other type (like Name_Id, if you're familiar with compiler sources), process in place...). - Bob