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=1.5 required=3.0 tests=BAYES_50,FREEMAIL_FROM, FROM_STARTS_WITH_NUMS autolearn=no autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a0c:b66c:: with SMTP id q44mr4156608qvf.3.1612982399602; Wed, 10 Feb 2021 10:39:59 -0800 (PST) X-Received: by 2002:a25:9387:: with SMTP id a7mr6279220ybm.73.1612982399292; Wed, 10 Feb 2021 10:39:59 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!news.uzoreto.com!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!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 10:39:59 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=85.245.161.241; posting-account=rhqvKAoAAABpikMmPHJSZh4400BboHwT NNTP-Posting-Host: 85.245.161.241 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <82631dc2-2903-4848-b662-eb149331623cn@googlegroups.com> Subject: "end of declaration" From: Mehdi Saada <00120260a@gmail.com> Injection-Date: Wed, 10 Feb 2021 18:39:59 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:61334 List-Id: can someone explain in simple terms what are the rules for types' "end of d= eclaration" ? 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 operation= s... since it's a fixed point type I need to, or bam ! recursion... also I = want the accuracy etc to stay the same so I would do the same for floating = point types too. type T_Proba is delta 0.00001 range 0.0 .. 1.0; for T_Proba'Small use 0.00001; 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 package Point_Fixe_io is new Ada.Text_Io.Fixed_IO(T_Proba); so I rather defined a different type with the same specifications. ugly. no nicer way to access predefined operations for these cases ?