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.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,ac4955b8006bd13c X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Received: by 10.68.196.232 with SMTP id ip8mr9670803pbc.6.1338791495744; Sun, 03 Jun 2012 23:31:35 -0700 (PDT) Path: l9ni17941pbj.0!nntp.google.com!news1.google.com!goblin3!goblin1!goblin2!goblin.stu.neva.ru!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Q: type ... is new String Date: Mon, 04 Jun 2012 08:30:14 +0200 Organization: A noiseless patient Spider Message-ID: References: <336f4e4b-16da-4fa8-9b7a-7e2dd3a48018@w24g2000vby.googlegroups.com> Mime-Version: 1.0 Injection-Date: Mon, 4 Jun 2012 06:30:12 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="zeAFTwWk1JWO9TY/bDbqcg"; logging-data="19450"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18uxef1memiG7P7N/vIWzxb" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 In-Reply-To: Cancel-Lock: sha1:SAiKscsSzEI14nHwy7qDoujGkhA= X-Enigmail-Version: 1.4.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: 2012-06-04T08:30:14+02:00 List-Id: Le 04/06/2012 07:58, Yannick DuchĂȘne (Hibou57) a Ă©crit : > Minimum_Length : constant := ; > Maximum_Length : constant := ; > > subtype Index_Type is Natural range Minimum_Length .. Maximum_Length; > > type Path_Type is new String (Index_Type); > -- Unfortunately, this freeze the lower and upper bound, and the > -- declaration below fails. > > XYZ_Location : Path_Type := "..................."; -- Will fail. Why not: type Path_Type is array (Index_Type range <>) of Character; ? Reminder: There is nothing special to type String, you'll still have literals etc. -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr