From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=BAYES_20,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a05:620a:1238:: with SMTP id v24mr3377551qkj.68.1612984861354; Wed, 10 Feb 2021 11:21:01 -0800 (PST) X-Received: by 2002:a25:3056:: with SMTP id w83mr6039479ybw.504.1612984861112; Wed, 10 Feb 2021 11:21:01 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!news.uzoreto.com!feeder1.cambriumusenet.nl!feed.tweak.nl!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 10 Feb 2021 11:21:00 -0800 (PST) In-Reply-To: <82631dc2-2903-4848-b662-eb149331623cn@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=2a01:799:620:ab00:d8d1:fa78:e1ad:6dc2; posting-account=uulyKwoAAAA86DO0ODu--rZtbje8Sytn NNTP-Posting-Host: 2a01:799:620:ab00:d8d1:fa78:e1ad:6dc2 References: <82631dc2-2903-4848-b662-eb149331623cn@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <07236c74-1838-42bd-9d02-bde8cb308071n@googlegroups.com> Subject: Re: "end of declaration" From: Egil H H Injection-Date: Wed, 10 Feb 2021 19:21:01 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:61336 List-Id: On Wednesday, February 10, 2021 at 7:40:00 PM UTC+1, 0012...@gmail.com wrote: > > I define a type in the private part of the package, and in the body I clone it (type t_proba2 is new t_proba) to benefit from its predefined operations... What? The predefined operations are already visible in the body. > since it's a fixed point type I need to, or bam ! recursion... huh? > package body P_Proba2 is > type t_proba2 is new T_Proba2; > -- type t_proba2 can't be use before the end of its declaration This is because of a typo... Try type t_proba2 is new T_Proba; instead. Except that you don't need this derived type, so just delete the line. > package Point_Fixe_io is new Ada.Text_Io.Fixed_IO(T_Proba); ...and here you're using the original type anyway, so... > no nicer way to access predefined operations for these cases ? Just call them, they are visible... -- ~egilhh