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!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: gnat.string_split , howto manipulate slice numbers Date: Tue, 29 Oct 2019 17:44:16 +0100 Organization: Adalog Message-ID: References: <5d710dac-d172-4a31-899e-1bf95e220ed6@googlegroups.com> <7fb6d1d0-18df-43b9-bcdc-9782dfb5171c@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 29 Oct 2019 16:44:17 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="73aadb64af1985d5c6b73196267cdc01"; logging-data="14300"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/j/HSnNsbwacXeh33PhCcc" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cancel-Lock: sha1:I6UVL98dYLRsmJqVnBG07Ie6MAo= In-Reply-To: <7fb6d1d0-18df-43b9-bcdc-9782dfb5171c@googlegroups.com> Content-Language: fr Openpgp: preference=signencrypt Xref: reader01.eternal-september.org comp.lang.ada:57372 Date: 2019-10-29T17:44:16+01:00 List-Id: Le 29/10/2019 à 12:20, Alain De Vos a écrit : > I tested and the addition of , > use type GNAT.String_Split.Slice_Number; > fixed it. > I looks like without it the operator - is not understood. It's not that it is not "understood", it just isn't visible. Unlike many languages, Ada has a very uniform view and little magic. "-" is just a function, which is automatically declared where the type it operates on is declared. Like anything else, you can use it if and only if it is visible. Use clauses, use type clauses, or dot notation are different ways of making things visible, depending how wide you want to open the visibility window. -- 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